Answers for "replace by positions a string in a list with another string python"

0

replace by positions a string in a list with another string python

string = 'pythonhxamples'
position = 6
new_character = 'e'

string = string[:position] + new_character + string[position+1:]
print(string)

#output: pythonexamples
Posted by: Guest on May-17-2021

Code answers related to "replace by positions a string in a list with another string python"

Python Answers by Framework

Browse Popular Code Answers by Language