Created
March 21, 2019 17:14
-
-
Save chicagowebmanagement/0af0e8bd33358e2b547a8853032423d4 to your computer and use it in GitHub Desktop.
3 lists, combine them and list elements of 1 list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lists = list() | |
fruit=["apple", "orange", "pear"] | |
bands=["U2","Bananarama", "George Thorogood", "Simple Minds"] | |
drinks=["vodka","beer","whiskey","cranberry juice"] | |
print("Current lists has members: ", lists) | |
lists.append(fruit) | |
print("Current lists has members: ", lists) | |
lists.append(bands) | |
print("Current lists has members: ", lists) | |
lists.append(drinks) | |
print("Current lists has members: ", lists) | |
print(drinks) | |
print(lists[2]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment