list = [same as array with different features]
array = [23, 'arrayItem', True, ['Hi', 34, False] ]
dictionary = {'key' : 'value'}
object = class testObj:
tuple = ( "a", "b", "c", "d" ); #same as list but non-changable
x = "You Rock!" #str
x = 69 #int
x = 69.9 #float
x = 1j #complex
x = ["red", "blue", "green"] #list
x = ("red", "blue", "green") #tuple
x = range(20) #range
x = {"name" : "Taylor", "age" : 35} #dict
x = {"red", "blue", "green"} #set
x = frozenset({"red", "blue", "chegreenrry"}) #frozenset
x = True #bool
x = b"You Rock!" #bytes
x = bytearray(10) #bytearray
x = memoryview(bytes(10)) #memoryview
x = None #NoneType
1
2
3
4
5
6
7
8
my_list = [1, 2, 3]
print(my_list)
my_list.append([555, 12]) #add as a single element
print(my_list)
my_list.extend([234, 'more_example']) #add as different elements
print(my_list)
my_list.insert(1, 'insert_example') #add element i
print(my_list)
1
2
3
4
5
6
7
8
9
my_list = [1, 2, 3, 'example', 3.132, 10, 30]
del my_list[5] #delete element at index 5
print(my_list)
my_list.remove('example') #remove element with value
print(my_list)
a = my_list.pop(1) #pop element from list
print('Popped Element: ', a, ' List remaining: ', my_list)
my_list.clear() #empty the list
print(my_list)