How to create a list in Python

 List 

List is a sequence of items separated by commas and 

the items are enclosed in square brackets [ ].


#To create a list

list1 = [5,3.4,"New Delhi","20C", 45]

#print the elements of list1

print(list1)


Comments

Popular posts from this blog

How to create a set in python

How to add comments in python ?