Master the Python List Data Structures

This activity shows the different situations about lists data structures and how can we manipulate each python lists, add, and commit files to the github repository.
First, creating and setting up the github repository named “Python List Data Structure“

After this we can now set up the branch and continue doing the following
1. Creating a 20 student name list and modifying each one is the first I commit in this activity
Here is the code snippets:
#Creating and adding items from the list
groupOne = ["Mark", "James", "Walter", "Perci", "Joana"]
groupTwo = ["Rodney", "Danica", "Jayson", "Leon", "Blake"]
groupThree = ["Harold", "Kobs", "Jenny", "Marie", "Chris"]
#Concatenating all the groups together
allStudents = groupOne + groupTwo + groupThree
#Printing index number 11
allStudents[11] = "John"
print()
print()
#Printing the 15th index of the list
print("The 15th index is: ", allStudents[-2])
print()
print()
#Modified the item in index number 11
print("The updated student: ", allStudents[10])
print()
print()
#Deleting the 9th index
allStudents.remove(allStudents[8])
print()
print()
print(allStudents)
2. Added an animal list and modify some of the items
Here is the code snippets from this log:
animalList = [
'Koala',
'Panther',
'Crocodile',
'Wolf',
'Lion',
'Fox',
'Tiger',
'Panda',
'Kangaroo',
'Dolphin'
]
print()
print(animalList)
print()
print("The third index is: ", animalList[2])
print()
animalList[5] = "Elephant"
animalList.remove(animalList[7])
print()
print(animalList)
print()
print(animalList[-1])
print()
3. Adds a color list
Here is the code snippets:
colorList = [
'Red',
'Blue',
'Green',
'Yellow',
'Skyblue',
'Orange',
'Pink',
'Brown',
'Cyan',
'Magenta',
'Turquoise',
'Lavender',
'Olive',
'Maroon',
'Teal'
]
print()
print(colorList)
print()
print("The 10th index is: ", colorList[9])
print()
colorList[3] = "Purple"
colorList.remove(colorList[4])
print()
print(colorList[2:8])
print()
print(colorList)
print()
4. Added a fruit list file
Here is the code snippets:
fruitList = [
'Apple',
'Banana',
'Orange',
'Guava',
'Pineapple',
'Strawberry',
'Grapes',
'Watermelon',
'Peach',
'Cherry',
'Blueberry',
'Kiwi'
]
print()
print(fruitList)
print()
print(fruitList[8])
print()
fruitList[1] = "Mango"
print()
fruitList.remove(fruitList[9])
print()
print(fruitList[4:7])
print()
print(fruitList[-1])
print()
5. Added a vegetable lists
Here is the code snippets:
vegetableList = [
'Carrot',
'Broccoli',
'Cauliflower',
'Potato',
'Tomato',
'Cucumber',
'Pepper'
]
print()
print(vegetableList)
print()
print("The 5th index is: ", vegetableList[4])
print()
vegetableList[2] = "Spinach"
print()
vegetableList.remove(vegetableList[5])
print(vegetableList)
print()
print(vegetableList[-1])
print()
6. Adds the movie lists
Here is the code snippets:
movieListOne = [
'Avengers',
'Hacksaw Ridge',
'Interstellar',
'Nerve',
'Ready Player One',
'How to Train your Dragon',
'Dunkirk',
'Enteng Kabisote',
'Captain America',
'Hulk',
]
movieListTwo= [
'Avengers: Endgame',
'Avengers: Age of Ultron',
'Wreck it Ralph',
'Alladin',
'Sonic the Hedgehog',
'The Flu',
'Ninja Turtles',
'Batman',
'Gagamboy',
'Spiderman',
]
allMovies = movieListOne + movieListTwo
print()
print(allMovies)
print()
print("The 12th index is: ", allMovies[11])
print()
allMovies[14] = "Inception"
print()
allMovies.remove(allMovies[17])
print(allMovies)
print()
print(allMovies[8:13])
print()
print(allMovies[-1])
print()
7. Adding a lists of games
Here is the code snippets:
gameList = [
"The Warriors", "Grand Theft Auto V", "League of Legends",
"God of War", "Guitar Hero", "GTA: San Andreas",
"Manhunt", "Bully", "DOTA 2",
"Tekken", "Super Mario", "PacMan",
"Fix it Felix Jr.", "It takes two", "Wukong",
]
print()
print(gameList)
print()
print("The 7th index is: ", gameList[6])
print()
gameList[3] = "Minecraft"
print()
gameList.remove(gameList[8])
for x in gameList:
print(x)
print()
print(gameList[5:10])
print()
print("The last index is: ", gameList[-1])
print()
8. Adds the list of every planet
Here is the code snippets:
planetList = ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus","Neptune",]
print()
print(planetList)
print()
print("The 3rd index is: ", planetList[2])
print()
planetList[6] = "Pluto"
planetList.remove(planetList[3])
for x in planetList:
print(x)
print()
print("This is the last index: ", planetList[-1])
print()
9. Added a list of programming language and modify some of the list
Here is the code snippets:
programmingLanguages = [
'Cobol','JavaScript',
'Java','C++',
'C#','Ruby',
'Go','Swift',
'Kotlin','TypeScript',
'PHP','Rust',
'Perl','R',
'Dart'
]
print()
print(programmingLanguages)
print()
print("The 11th index is: ", programmingLanguages[10])
print()
programmingLanguages[8] = "Python"
programmingLanguages.remove(programmingLanguages[12])
print()
for x in programmingLanguages:
print(x)
print()
print(programmingLanguages[5:12])
print()
print("The last index is: ", programmingLanguages[-1])
print()
10. Added the flower lists
Here is the code snippets:
flowerNames = ["gumamela", "lily", "sunflower", "daisy", "tulip", "orchid", "carnation", "iris", "peony", "jasmine"]
print()
print(flowerNames)
print()
print("The 5th index is: ", flowerNames[4])
print()
flowerNames[7] = "rose"
flowerNames.remove(flowerNames[1])
print()
for x in flowerNames:
print(x)
print()
print("The last index is: ", flowerNames[-1])
print()
11. Adds an author lists
Here is the code snippets:
authors = ["William Shakespeare", "Jane Austen",
"Charles Dickens", "Sara Tambaloslos",
"Leo Tolstoy", "F. Scott Fitzgerald",
"Ernest Hemingway", "George Orwell",
"Harper Lee", "J.R.R. Tolkien",
"Gabriel García Márquez", "J.K. Rowling"
]
print()
print(authors)
print()
print("The 6th index is: ", authors[5])
print()
authors[3] = "Mark Twain"
authors.remove(authors[9])
for x in authors:
print(x)
print()
print(authors[3:8])
print()
print("The last index is: ", authors[-1])
print()
12. Add a language list
Here is the code snippets:
languageList = ["English", "Spanish", "Chinese", "Hindi", "Arabic", "Portuguese", "Bengali", "Russian", "Japanese", "Punjabi", "Marathi", "Telugu", "German", "French", "Javanese", "Urdu", "Vietnamese", "Korean", "Turkish", "Italian"]
print("Entire list:", languageList)
print("The 13th index is: ", languageList[12])
print()
languageList[9] = "Spanish"
del languageList[15]
for x in languageList:
print(x)
print()
print(languageList[6:11])
print()
print("The last index: is", languageList[-1])
print()
13. Added the lists of mountain names
Here is the code snippets:
mountainNames = ["Mount Apo", "Mount Pulag", "Mount Kitanglad", "Mount Makiling", "Mount Banahaw", "Mount Mayon", "Mount Kanlaon", "Mount Isarog"]
print()
print(mountainNames)
print()
print("This is the 5th index ", mountainNames[4])
print()
mountainNames[2] = "Everest"
print()
del mountainNames[5]
for x in mountainNames:
print(x)
print()
print("The last index is: ", mountainNames[-1])
print()
14. Adding the company lists
Here is the code snippets:
15. Added the cutie Pokemon lists
Here is the code snippets:
pokemons = ["Charmander", "Bulbasaur",
"Squirtle", "Eevee",
"Gengar", "Lucario",
"Dragonite", "Mewtwo",
"Gyarados", "Togepi",
"Jigglypuff", "Snorlax",
"Magikarp", "Espeon"
]
print()
print(pokemons)
print()
print("The 9th index is: ", pokemons[8])
print()
pokemons[11] = "Pikachu"
del pokemons[10]
for x in pokemons:
print(x)
print()
print(pokemons[3:6])
print()
print("The last index is: ", pokemons[-1])
print()
16. Adds the list of animal species
Here is the code snippets:
animalSpecies = [
"Lion",
"Tiger",
"Elephant",
"Giraffe",
"Zebra",
"Panda",
"Dolphin"
]
print()
print(animalSpecies)
print()
print("The second index is: ", animalSpecies[1])
print()
animalSpecies[4] = "Gorilla"
print()
del animalSpecies[5]
for x in animalSpecies:
print(x)
print()
print("The last index is: ", animalSpecies[-1])
print()
17. Adds the historical figures list
Here is the code snippets:
historicalFigures = [
"Alexander the Great",
"Julius Caesar",
"Queen Elizabeth I",
"Napoleon Bonaparte",
"Abraham Lincoln",
"Albert Einstein",
"Marie Curie",
"Martin Luther King Jr.",
"Winston Churchill",
"Malala Yousafzai"
]
print()
print(historicalFigures)
print()
print("The 6th index is: ", historicalFigures[7])
print()
historicalFigures[3] = "Nelson Mandela"
del historicalFigures[6]
for x in historicalFigures:
print(x)
print("The last index is: ", historicalFigures[-1])
print()
18. Adding the list of famous inventions in the world
Here is the code snippets:
famousInventions = [
"Transistor",
"Telephone",
"Airplane",
"Computer",
"Internet",
"Smartphone",
"Penicillin",
"Wheel"
]
print()
print(famousInventions)
print()
print("The 6th index is: ", famousInventions[5])
print()
famousInventions[1] = "Lightbulb"
del famousInventions[4]
for x in famousInventions:
print(x)
print()
print("The last index is: ", famousInventions[-1])
print()
19. Adding a list of holidays
Here is the code snippets:
holidays = [
"Lunar New Year",
"New Year's Day",
"Valentine's Day",
"Easter",
"Mother's Day",
"Father's Day",
"Independence Day",
"Halloween",
"Thanksgiving",
"Hanukkah",
"Ramadan",
"Eid al-Fitr"
]
print()
print(holidays)
print()
print("The 9th index is: ", holidays[8])
holidays[2] = "Christmas"
del holidays[10]
for x in holidays:
print(x)
print()
print(holidays[1:6])
print()
print(holidays[-1])
print()
20. Adds the list of desserts
Here is the code snippets:
desserts = [
"Ice cream",
"Cake",
"Chocolate chip cookies",
"Apple pie",
"Cheesecake",
"Tiramisu",
"Crème brûlée",
"Brownies",
"Pancakes",
"Donuts"
]
print()
print(desserts)
print()
print("The 4th index is: ", desserts[3])
print()
desserts[5] = "Chocolate Cake"
print()
del desserts[2]
for x in desserts:
print(x)
print()
print("The last index is: ", desserts[-1])
print()
21. Adds the list of festivals all around the world
Here is the code snippets:
festivals = [
"Christmas",
"New Year's Eve",
"Halloween",
"Easter",
"Eid al-Fitr",
"Diwali",
"Hanukkah",
"Chinese New Year",
"Valentine's Day",
"Cinco de Mayo"
]
print()
print(festivals)
print()
print("The 5th index is: ", festivals[4])
festivals[2] = "Thanksgiving"
del festivals[6]
for x in festivals:
print(x)
print()
print("The last index is: ", festivals[-1])
print()
22. Adding a continent lists
Here is the code snippets:
continents = [
"Asia",
"Africa",
"North America",
"South America",
"Europe",
"Oceania",
"Antarctica"
]
print()
print(continents)
print()
print("The 4th index is: ", continents[3])
print()
continents[1] = "Africa"
del continents[5]
for x in continents:
print(x)
print()
print(continents[-1])
print()
23. Adding a furniture item lists
Here is the code snippets:
furnitureItems = [
"Loveseat",
"Bed",
"Table",
"Chair",
"Wardrobe",
"Dresser",
"Bookshelf",
"Couch",
"Desk",
"Kitchen cabinet",
"Dining table",
"Bedside table"
]
print()
print(furnitureItems)
print()
print("The 8th index is: ", furnitureItems[7])
print()
furnitureItems[4] = "Sofa"
del furnitureItems[9]
for x in furnitureItems:
print(x)
print()
print("The last index is: ", furnitureItems[-1])
print()
24. Adding lists of social medias
Here is the code snippets:
socialMedias = [
"Facebook",
"Threads",
"Twitter",
"TikTok",
"YouTube",
"Snapchat",
"LinkedIn",
"Reddit",
"Pinterest",
"WeChat"
]
print()
print(socialMedias)
print()
print("The 5th index is: ", socialMedias[4])
print()
socialMedias[2] = "Instagram"
del socialMedias[7]
for x in socialMedias:
print(x)
print()
print("The last index is: ", socialMedias[-1])
print()
25. Adding a lists of popular sports in the world
Here is the code snippets:
popularSports = [
"Soccer",
"Badminton",
"Tennis",
"Volleyball",
"Baseball",
"American football",
"Cricket",
"Hockey",
"Golf",
"Swimming"
]
print()
print(popularSports)
print()
print(popularSports[5])
popularSports[3] = "Basketball"
del popularSports[8]
for x in popularSports:
print(x)
print()
print(popularSports[-1])
print()
26. Adding a music genre list
Here is the code snippets:
musicGenres = [
"Pop",
"Rock",
"Hip hop",
"Electronic",
"Country",
"Classical",
"R&B",
"Blues",
"Reggae",
"Metal",
"Punk",
"Soul",
"Gospel",
"Folk",
"Indie"
]
print()
print(musicGenres)
print()
print(musicGenres[9])
musicGenres[4] = "Jazz"
del musicGenres[6]
for x in musicGenres:
print(x)
print()
print(musicGenres[2:7])
print()
print(musicGenres[-1])
print()
27. Adding the lists of famous buildings in the world
Here is the code snippets:
famousBuildings = [
"The Colosseum",
"The Taj Mahal",
"The Great Wall of China",
"The Burj Khalifa",
"The Empire State Building",
"The Sydney Opera House",
"The Sagrada Família",
"The Petronas Towers"
]
print()
print(famousBuildings)
print()
print("The 5th index is: ", famousBuildings[4])
print()
famousBuildings[1] = "Eiffel Tower"
del famousBuildings[5]
for x in famousBuildings:
print(x)
print()
print("The last index is: ", famousBuildings[-1])
print()
28. Adds a lists of famous actors and actresses in the world
Here is the code snippets:
famousActors = [
"Tom Hanks",
"Meryl Streep",
"Brad Pitt",
"Scarlett Johansson",
"Robert Downey Jr.",
"Nicole Kidman",
"Denzel Washington",
"Natalie Portman",
"Will Smith",
"Julia Roberts"
]
print()
print(famousActors)
print()
print("The 7th index is: ", famousActors[6])
print()
famousActors[2] = "Leonardo Di Caprio"
del famousActors[7]
for x in famousActors:
print(x)
print()
print("The last index is: ", famousActors[-1])
print()
29. Added a school subject lists
Here is the code snippets:
schoolSubjects = [
"English",
"Science",
"History",
"Geography",
"Art",
"Music",
"Physical Education",
"Computer Science",
"Home Economics",
"Philosophy",
"Psychology",
"Sociology"
]
print()
print(schoolSubjects)
print()
print("The 6th index is: ", schoolSubjects[5])
print()
schoolSubjects[7] = "Mathematics"
del schoolSubjects[4]
for x in schoolSubjects:
print(x)
print()
print(schoolSubjects[1:4])
print()
print("The last index is: ", schoolSubjects[-1])
print()
30. Adds a list of tools
Here is the code snippets:
Tools = [
"Tape Measure",
"Saw",
"Level",
"Screwdriver",
"Chisel",
"Plane",
"Clamps",
"Drill",
"Router",
"Utility Knife"
]
print()
print(Tools)
print()
print("The 4th index is: ", Tools[3])
print()
Tools[6] = "Hammer"
print()
del Tools[4]
for x in Tools:
print(x)
print()
print(Tools[-1])
print()
31. Adds the lists of technology inventions through the years
Here is the code snippets:
modernInventions = [
"Electric Vehicle (EV)",
"Drone", "Virtual Reality (VR)",
"Augmented Reality (AR)",
"Artificial Intelligence (AI)", "3D Printer",
"Self-Driving Car",
"Renewable Energy Sources", "Blockchain",
"Wearable Technology",
"Quantum Computing", "Gene Editing",
"Space Exploration",
"Biotechnology", "Internet of Things (IoT)"
]
print()
print(modernInventions)
print()
print("The 11th index is: ", modernInventions[10])
print()
modernInventions[7] = "Smartphone"
del modernInventions[13]
print()
print(modernInventions[4:9])
print()
print(modernInventions[-1])
print()
32. Add habitat lists
Here is the code snippets:
animalHabitats = [
"Rainforest",
"Desert",
"Tundra",
"Taiga",
"Grassland",
"Ocean",
"Arctic",
"Freshwater"
]
print()
print(animalHabitats)
print()
print("The 5th index is: ", animalHabitats[4])
print()
animalHabitats[2] = "Savannah"
del animalHabitats[5]
for x in animalHabitats:
print(x)
print()
print("The last index is: ", animalHabitats[-1])
print()
33. Adding a job title list
Here is the code snippets:
jobTitles = [
"Full Stack Developer",
"Data Scientist",
"Project Manager",
"Marketing Specialist",
"Graphic Designer",
"Accountant",
"Teacher",
"Nurse",
"Doctor",
"Lawyer"
]
print()
print(jobTitles)
print()
print("The 6th index is: ", jobTitles[5])
jobTitles[4] = "Software Engineer"
print()
del jobTitles[8]
for x in jobTitles:
print(x)
print()
print("The last index is: ", jobTitles[-1])
print()
34. Adding an ocean lists
Here is the code snippets:
oceans = [
"Atlantic Ocean",
"Indian Ocean",
"Arctic Ocean",
"Southern Ocean",
"Mediterranean Sea"
]
print()
print(oceans)
print()
print("The 3rd index is: ", oceans[2])
print()
oceans[1] = "Pacific Ocean"
del oceans[3]
for x in oceans:
print(x)
print()
print("The last index is: ", oceans[-1])
print()
35. Adding a bird lists
Here is the code snippets:
oceans = [
"Atlantic Ocean",
"Indian Ocean",
"Arctic Ocean",
"Southern Ocean",
"Mediterranean Sea"
]
print()
print(oceans)
print()
print("The 3rd index is: ", oceans[2])
print()
oceans[1] = "Pacific Ocean"
del oceans[3]
for x in oceans:
print(x)
print()
print("The last index is: ", oceans[-1])
print()
36. Adding lists of currencies
Here is the code snippets:
currencies = [
"US Dollar",
"British Pound",
"Japanese Yen",
"Chinese Yuan",
"Indian Rupee",
"Canadian Dollar",
"Australian Dollar",
"South African Rand",
"Brazilian Real",
"Russian Ruble"
]
print()
print(currencies)
print()
print("The 4th index is: ", currencies[3])
currencies[6] = "Euro"
del currencies[8]
for x in currencies:
print(x)
print()
print("The last index is: ", currencies[-1])
print()
37. Adding a list of recipes
Here is the code snippets:
recipes = [
"Spaghetti Bolognese",
"Chicken Alfredo",
"Beef Stroganoff",
"Sushi",
"Pizza",
"Tacos",
"Burritos",
"Quesadillas",
"Pad Thai",
"Ramen",
"Curry",
"Chili",
"Mac and Cheese",
"Chicken Pot Pie",
"Shepherd's Pie"
]
print()
print(recipes)
print()
print("The 12th index is: ", recipes[11])
recipes[8] = "Lasagna"
del recipes[10]
for x in recipes:
print(x)
print()
print(recipes[4:9])
print()
print("The last index is: ", recipes[-1])
print()
38. Adding a lists of popular drinks
Here is the code snippets:
drinks = [
"Tea",
"Soda",
"Juice",
"Milk",
"Water",
"Wine",
"Beer",
"Cocktail"
]
print()
print(drinks)
print()
print("The 4th index is: ", drinks[3])
print()
drinks[2] = "Coffee"
del drinks[6]
for x in drinks:
print(x)
print()
print("The last index is: ", drinks[-1])
print()
39. Adds a list of universities
Here is the code snippets:
universities = [
"Stanford University",
"Massachusetts Institute of Technology (MIT)",
"Yale University",
"Princeton University",
"Columbia University",
"University of California, Berkeley",
"University of Chicago",
"University of Pennsylvania",
"Duke University",
"Johns Hopkins University"
]
print()
print(universities)
print()
print("The 6th index is: ", universities[5])
print()
universities[3] = "Harvard University"
del universities[8]
for x in universities:
print(x)
print()
print("The last index is: ", universities[-1])
print()
40. Adding the lists of festival celebrations
Here is the code snippets:
festivals = [
"Christmas",
"New Year's Eve",
"Halloween",
"Easter",
"Eid al-Fitr",
"Diwali",
"Hanukkah",
"Chinese New Year",
"Valentine's Day",
"Cinco de Mayo"
]
print()
print(festivals)
print()
print("The 5th index is: ", festivals[4])
festivals[2] = "Thanksgiving"
del festivals[6]
for x in festivals:
print(x)
print()
print("The last index is: ", festivals[-1])
print()
41. Adding a lists of countries and the continents they belong
Here is the code snippets:
countriesAndContinents = [
("United States", "North America"),
("Canada", "North America"),
("Mexico", "North America"),
("Brazil", "South America"),
("Argentina", "South America"),
("China", "Asia"),
("India", "Asia"),
("Japan", "Asia"),
("New Zealand", "Oceania"),
("Russia", "Europe"),
("France", "Europe"),
("Germany", "Europe"),
("Egypt", "Africa"),
("South Africa", "Africa")
]
print()
print(countriesAndContinents)
print()
print("The 9th index is: ", countriesAndContinents[8])
countriesAndContinents[9] = "Australia"
del countriesAndContinents[11]
for x in countriesAndContinents:
print(x)
print()
print(countriesAndContinents[3:7])
print()
print("The last index is: ", countriesAndContinents[-1])
print()
42. Adding the lists of dinosaurs
Here is the code snippets:
dinosaurNames = ["Allosaurus", "Stegosaurus", "Brachiosaurus", "Velociraptor", "Ankylosaurus", "Spinosaurus", "Dilophosaurus", "Pterodactyl"]
print()
print(dinosaurNames)
print()
print("The 4th index is: ", dinosaurNames[3])
print()
dinosaurNames[5] = "Tyrannosaurus Rex"
del dinosaurNames[6]
for x in dinosaurNames:
print(x)
print()
print("The last index is: ", dinosaurNames[-1])
print()
43. Adding a lists of natural landmarks in the world
Here is the code snippets:
naturalLandmarks = [
"Niagara Falls",
"Great Barrier Reef",
"Mount Everest",
"Victoria Falls",
"Iguazu Falls",
"Galapagos Islands",
"Amazon Rainforest",
"Yellowstone National Park",
"Uluru (Ayers Rock)",
"Salar de Uyuni"
]
print()
print(naturalLandmarks)
print()
print("The 8th index is: ", naturalLandmarks[7])
print()
naturalLandmarks[4] = "Grand Canyon"
del naturalLandmarks[8]
for x in naturalLandmarks:
print(x)
print()
print("The last index is: ", naturalLandmarks[-1])
print()
44. Adding a lists of animal speeds
Here is the code snippets:
landAnimalsSpeed = [
"Gorilla 25 km/h",
"Horse 70 km/h",
"Elephant 40 km/h",
"Kangaroo 70 km/h",
"Gazelle 100 km/h",
"Lion 80 km/h",
"Giraffe 60 km/h",
"Bear 40 km/h",
"Rabbit 55 km/h",
"Squirrel 20 km/",
"Deer 80 km/",
"Snake 5 km/"
]
print()
print(landAnimalsSpeed)
print()
print("The 7th index is: ", landAnimalsSpeed[6])
print()
landAnimalsSpeed[8] = "Cheetah - 120 km/h"
del landAnimalsSpeed[9]
print()
print(landAnimalsSpeed[2:6])
print()
print(landAnimalsSpeed[-1])
print()
45. Adding a lists of famous rivers and
Here is the code snippets:
famousRivers = [
"Amazon River",
"Yangtze River",
"Mississippi River",
"Congo River",
"Yellow River",
"Mekong River",
"Ganges River",
"Danube River",
"Lena River",
"Zambezi River"
]
print()
print(famousRivers)
print()
print("The 6th index is: ", famousRivers[5])
print()
famousRivers[7] = "Nile River"
for x in famousRivers:
print(x)
print()
print("The last index is: ", famousRivers[-1])
print()
46. Adding a lists of famous volcanoes
Here is the code snippets:
famousVolcanoes = [
"Mount Fuji (Japan)",
"Mount Kilimanjaro (Tanzania)",
"Mount Pinatubo (Philippines)",
"Mount Etna (Italy)",
"Mount Saint Helens (United States)",
"Mauna Loa (Hawaii, United States)",
"Mount Krakatoa (Indonesia)"
]
print()
print(famousVolcanoes)
print()
print("The 4th index is: ", famousVolcanoes[3])
print()
famousVolcanoes[2] = "Mount Vesuvius (Italy)"
del famousVolcanoes[4]
for x in famousVolcanoes:
print(x)
print()
print("The last index is: ", famousVolcanoes[-1])
print()
47. Adding a lists of famous waterfalls
Here is the code snippets:
famousWaterfalls = [
"Victoria Falls",
"Angel Falls",
"Iguazu Falls",
"Yosemite Falls",
"Kaieteur Falls",
"Dettifoss",
"Plitvice Lakes",
"Tugela Falls",
"Ban Gioc-Detian Falls",
"Skógafoss"
]
print()
print(famousWaterfalls)
print()
print("The 8th index is: ", famousWaterfalls[7])
print()
famousWaterfalls[4] = "Niagra Falls"
del famousWaterfalls[8]
for x in famousWaterfalls:
print(x)
print()
print("The last index is: ", famousWaterfalls[-1])
print()
48. Adding a lists of famous bridge in the world
Here is the code snippets:
famousBridges = [
"Tower Bridge",
"Sydney Harbour Bridge",
"Akashi Kaikyō Bridge",
"Ponte Vecchio",
"Charles Bridge",
"Boro Bridge",
"Brooklyn Bridge",
"Millennium Bridge"
]
print()
print(famousBridges)
print()
print("The 3rd index is: ", famousBridges[2])
print()
famousBridges[5] = "Golden Gate Bridge"
del famousBridges[6]
for x in famousBridges:
print(x)
print()
print("The last index is: ", famousBridges[-1])
print()
49. Adding a lists of world wonders
Here is the code snippets:
worldWonders = [
"Chichen Itza",
"Petra",
"Machu Picchu",
"Christ the Redeemer",
"Colosseum",
"Taj Mahal",
"Christ the Redeemer"
]
print()
print(worldWonders)
print()
print("The 4th index is: ", worldWonders[3])
print()
worldWonders[1] = "Great Wall of China"
del worldWonders[4]
for x in worldWonders:
print(x)
print()
print("The last index is: ", worldWonders[-1])
print()
50. Adding a lists of space exploration missions
Here is the code snippets:
spaceMissions = [
"Voyager 1",
"Voyager 2",
"Cassini-Huygens",
"Galileo",
"Juno",
"Curiosity",
"Opportunity",
"Mars Pathfinder",
"Hubble Space Telescope",
"James Webb Space Telescope"
]
print()
print(spaceMissions)
print()
print("The 5th index is: ", spaceMissions[6])
print()
spaceMissions[3] = "Apollo 11"
del spaceMissions[5]
for x in spaceMissions:
print(x)
print()
print("The last index is: ", spaceMissions[-1])
print()
GITHUB LINK: https://github.com/rodney-lqr/Python-List-Data-Structures



