Insert element at index

Question

Insert “Sanitizer” at the 4th position in the kit.

kit=[“gloves”, “masks”, “disinfectant”, “spray-cleaner”, “vaccine”]

 

in progress 0
YashikaKhurana 4 years 1 Answer 757 views Master 0

Answer ( 1 )

  1. Use this LOC:
    kit.insert(3, “Sanitizer”)

Leave an answer

Browse
Browse