Answers for "python list add with index string"

15

python add to list with index

list.insert(index, element)
Posted by: Guest on November-21-2019
0

add place in certain index python string

>>> hash = '355879ACB6'
>>> hashlist = list(hash)
>>> hashlist.insert(4, '-')
>>> ''.join(hashlist)
'3558-79ACB6'
Posted by: Guest on July-24-2020

Python Answers by Framework

Browse Popular Code Answers by Language