String
- Sequence of characters, enclosed –“ ”/’ ’/””” “””, ordered, immutable, duplicates allowed
- Accessing Items: Indexing ,slicing and for loop
- Functions: capitalize(), title(), upper(), lower(), lstrip() ,rstrip() ,strip(), swapcase(), replace(), find(), split(), join() ,endswith(), startswith(), del, index(), count(), isalnum(), isalpha(), isdecimal(), isdigit(), isnumeric(), islower() ,isupper(), istitle(), isspace(), zfill(),center().
List
- collection of heterogeneous datatype, enclosed –[ ], ordered, mutable duplicates allowed
- Accessing Items: Indexing ,slicing and for loop
- Functions: append(), extend(), insert(), remove(), pop(), clear(), del, sort(), reverse(), index(), count()
Tuple
- collection of heterogeneous datatype, enclosed –( ), ordered, immutable, duplicates allow
- Accessing Items: Indexing ,slicing and for loop
- Functions: Index(), count()
Set
- collection of immutable items, enclosed in –{ }.,unordered, mutable, duplicates not allows
- Accessing Items:for loop
- Functions:remove(), discard(), pop(), clear(), del, add(), update(), union(), intersection(), intersection_update, difference() ,difference_update() ,symmetric_difference, symmetric_difference_update(), issubset(), issuperset(), isdisjoint(),
Frozen set
- collection of immutable items, enclosed in –{()}.,unordered, immutable, duplicates not allow.
- Accessing Items:for loop
- Functions: Union(), intersection(), difference(), symmetric_difference.
Dictionary
- collection of key and value pairs, enclosed in –{ }., ordered, mutable, duplicates allows Keys:immutable,Values:mutables
- Accessing Items: Indexing ,slicing and for loop
- Functions: Dict_name[keyname], update(), pop(), popitems(), clear(), del, fromkeys(),setdefault().
Bool
- True and False
'ML Engineering > python' 카테고리의 다른 글
03. Binary Tree DFS Techniques (0) | 2024.08.06 |
---|---|
02. Sliding Window Technique (0) | 2024.08.06 |
01. Two Pointers Technique (0) | 2024.08.06 |
Differences between subarrays, substrings, subsequences, and subsets (0) | 2024.08.06 |
Python 2 vs 3 Difference (0) | 2024.04.12 |