Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python insert list

# create a list of vowels
vowel = ['a', 'e', 'i', 'u']

# 'o' is inserted at index 3 (4th position)
vowel.insert(3, 'o')


print('List:', vowel)

# Output: List: ['a', 'e', 'i', 'o', 'u']
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #python #insert #list
ADD COMMENT
Topic
Name
7+8 =