Skip to content

How to add lists to lists in Python?

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]
See also  How to loop through list in Python?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.