0
what is list keyword
2 odpowiedzi
0
List is a kind of variable which contains a list of other variable. For example:
This is an empty list:
mylist=[]
This is a list which contains 3 word:
otherlist=["hello", "world", "bye"]
0
List is like a container, which can hold many values of different data type.
for eg:
new_list = ['hello',2,3,[0,1]]
If you see the above example the list contains a string, integer and a list.
we usually deal with a single data type in the list.