๐๐๐ญ๐ ๐๐ญ๐ซ๐ฎ๐๐ญ๐ฎ๐ซ๐๐ฌ : ๐๐ฑ๐ฉ๐ฅ๐จ๐ซ๐ ๐ฅ๐ข๐ฌ๐ญ๐ฌ, ๐ญ๐ฎ๐ฉ๐ฅ๐๐ฌ, ๐๐ง๐ ๐๐ข๐๐ญ๐ข๐จ๐ง๐๐ซ๐ข๐๐ฌ
๐๐ข๐ฌ๐ญ๐ฌ:
- Lists are ordered collections of items.
- They are mutable, meaning you can change their content after creation.
- You can have duplicate values in a list.
- Lists are defined using square brackets [ ].
Example:
my_list = [1, 2, 3, 'apple', 'banana', 'cherry']
๐๐ฎ๐ฉ๐ฅ๐๐ฌ:
- Tuples are ordered collections of items, similar to lists.
- However, they are immutable, meaning once created, their content cannot be changed.
- Tuples are defined using parentheses ( ).
- You can have duplicate values in a tuple.
Example:
my_tuple = (1, 2, 3, 'apple', 'banana', 'cherry')
๐๐ข๐๐ญ๐ข๐จ๐ง๐๐ซ๐ข๐๐ฌ:
- Dictionaries are unordered collections of items that are stored as key-value pairs.
- They are mutable.
- Dictionaries are defined using curly braces { }.
- Each key in a dictionary must be unique, but the values can be duplicated.
Example:
my_dict = {'name': 'John', 'age': 30, 'city': 'New York'}
I have curated the best interview resources to crack Python Interviews ๐๐
https://topmate.io/coding/898340
Hope you'll like it
Like this post if you need more resources like this ๐โค๏ธ
Post #1661
2.29K
- ๐ 3