Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How can I add a list in Python

myList = [1, 2, 3] 
myList.append(4)

fruits = ["watermelon","banana","Cherry","pineapple","oranges"]
vegitable = ["Tomato","potato","torry","bottle goud","bittre gourd"]
#adding fruits and vegitable in a list called dirty_dozen
dirty_dozen = [fruits, vegitable]
print(dirty_dozen)
Source by www.codewithharry.com #
 
PREVIOUS NEXT
Tagged: #How #I #add #list #Python
ADD COMMENT
Topic
Name
9+2 =