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

Solutions on MaxInterview for replace by positions a string in a list with another string python by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "replace by positions a string in a list with another string python"
Cornelia
24 Nov 2018
1string = 'pythonhxamples'
2position = 6
3new_character = 'e'
4
5string = string[:position] + new_character + string[position+1:]
6print(string)
7
8#output: pythonexamples