There are 4 datas type in python so they are List,truples, Dictionary ,and set . So today i am gonna write or share some information that i do know about List in python . List can be created using square brackets for example
List=['L1','L2','L3']
print(List)
similary we can short this list , the first item is indexed in the form of List[0] 2nd one in the form of List[1]. here is example as well to make it much more clear .
Also the next way to create list is to use list constructor the syntax for the list constructor is list(); so here is the example to make list using this constructor .
There are 4 datas type in python so they are List,truples, Dictionary ,and set . So today i am gonna write or share some information that i do know about List in python . List can be created using square brackets for example
List=['L1','L2','L3']
print(List)
similary we can short this list , the first item is indexed in the form of List[0] 2nd one in the form of List[1]. here is example as well to make it much more clear .
Also the next way to create list is to use list constructor the syntax for the list constructor is list(); so here is the example to make list using this constructor
.