Open jesmet opened 6 days ago
Vegetables=["carrots","potato","tomato"] Fruits=["apple","banana","cherry"] Grocery = vegetables +fruits Print(Grocery) Grocery.sort() Print(Grocery. Sort)
Vegetables=["carrots","potato","tomato"] Fruits=["apple","banana","cherry"] Grocery = vegetables +fruits Print(Grocery) Grocery.sort() Print(Grocery. Sort)
Veg=["carrots","potato","tomato"] Fru=["apple","banana","cherry"] Grocery = Veg +Fru Print(Grocery) Grocery.sort() Print(Grocery. Sort)
Day 6
list
Create a list called vegetables with the elements: "Carrot", "Potato", "Tomato".
Create another list called fruits with the elements: "Apple", "Banana", "Cherry".
Combine the two lists into a new list called grocery.
Print the grocery list.
Sort the grocery list in alphabetical order using the appropriate list function.
Print the sorted grocery list.