Page 1 of 1

Python: Insert Into List

Posted: Fri Sep 05, 2025 5:02 am
by The Jason

Code: Select all

small_list_of_plants = list(("mushroom", "poison ivy", "grass"))

small_list_of_plants.insert(1, "potato")

print(small_list_of_plants)

# Will display ['mushroom', 'potato', 'poison ivy', 'grass']