728x90

오늘은 강의보고 퀴즈 푸는 날!
그리고 오늘부터는 영어로 내용을 정리해보려한다. 강의 자체가 영어이기도 하고, 영어 공부도 할 겸
주제:
Data Structures Quiz!
강의: #4.0 ~ #4.4 (python 자료구조)
- Organization of data using "Data structure" (자료구조는 데이터를 구조화하고 싶을 때 사용함!)
- 3 Python data structures : list, tuple, dictionary
- List & Tuple : Ordered sequences of values
- Dicts
- List : We use square brackets to create a list and write data seperated by commas inside of the square brackets.
ex) days = ["Mon", "Tue", "Wed"]- append (arguemnt -> object)
- remove (argument -> value)
- pop (argument -> index)
- insert (argument -> value, object)
- index (argument -> value, start, stop)
- count (argument -> value)
- sort (argument -> key, reverse)
- reverse
- clear
- copy
- extend (argument -> iterable)
- Tuple : Tuple is almost like a list. To create a tuple, we use parenthesis instead of the square brackets. The What is the difference between a tuple and a list? a tuple is immutable which means we cannot change it.
ex) days = ("Mon", "Tue", "Wed")
- count (argument -> value)
- index (argument -> value, start, stop)
- Dictionary : a word with a definition ~ key & value pair.
curly brackets
- List : We use square brackets to create a list and write data seperated by commas inside of the square brackets.
- Function & Method
- They look the same. Method is just like a function literally..!
- Method is a function that is bound to data using a dot.
- Mutable <-> Immutable
- "Modify" in the language of programmers is called "Mutate"
- How to access elements in list, tuple, dicts
- Open square brackets and write the index which is the position on the list/tuple. ex) days[0]
'노마드코더 챌린지 > 파이썬 2주 완성반' 카테고리의 다른 글
Python으로 웹 스크래퍼 만들기 - Day 8 (0) | 2024.04.23 |
---|---|
Python으로 웹 스크래퍼 만들기 - Day 6 & 7 (0) | 2024.04.22 |
Python으로 웹 스크래퍼 만들기 - Day 4 (1) | 2024.04.18 |
Python으로 웹 스크래퍼 만들기 - Day 3 (2) | 2024.04.18 |
Python으로 웹 스크래퍼 만들기 - Day 2 (0) | 2024.04.16 |