Variable_name = [item1, item2…..]







classmates = ["Karan","sumit","amit”]
print(classmates)











classmates = ["Karan","sumit","amit"]
print (classmates[0])
print (classmates[1])
print (classmates[2])











classmates = ["Karan","sumit","amit"]

print(classmates)

classmates[1] = "Tarun"

print(classmates)











persondata = ["Karan" , 35, "India",12.5]

print(persondata)











[1,2,[3,4]]




nested_list = [1,2,[3,4]]
print("Element in nested list:", nested_list[2][0], " and ", nested_list[2][1])











empty_list = []

print("Display empty list:", empty_list)







Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, February 13, 2019
 
Updated On  -  Thursday, May 02, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250