Page 1 of 1

Python: Insert Into List

Posted: Tue Apr 07, 2026 5:13 pm
by 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']