Used for numbers.
Types
int
float
complex
a = 10 # int
b = 3.14 # float
c = 2 + 3j # complex
print(type(a))
print(type(b))
print(type(c))
<class 'int'> <class 'float'> <class 'complex'>
Used to store text.
name = "Shubham"
city = 'Pune'
print(name)
print(type(name))
Shubham <class 'str'>
text = "Python"
print(text.upper())
print(text.lower())
print(len(text))
PYTHON python 6
A list is an ordered collection of items.
Mutable (can change)
Similar to list but immutable (cannot change).
Stores key-value pairs.