Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

py insert char at index

a_string = "ac"
a_string = a_string[:1] + "b" + a_string[1:]
print(a_string)
>>> abc
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #py #insert #char #index
ADD COMMENT
Topic
Name
2+9 =