The other answers are correct, but you can, of course, do something like:
>>> str1 = "mystring"
>>> list1 = list(str1)
>>> list1[5] = 'u'
>>> str1 = ''.join(list1)
>>> print(str1)
mystrung
>>> type(str1)
<type 'str'>
if you really want to.
More Related Contents:
- How to convert a string in the desired manner?
- Format timedelta to string
- How to search and replace text in a file?
- How to get a string after a specific substring?
- How to input a regex in string.replace?
- Converting a String to a List of Words?
- How do I trim whitespace from a string?
- Python csv string to array
- Is the time-complexity of iterative string append actually O(n^2), or O(n)?
- Case insensitive replace
- How to replace two things at once in a string?
- How to remove the left part of a string?
- Reading a text file and splitting it into single words in python
- Why are python strings and tuples are made immutable?
- Split string using a newline delimiter with Python [duplicate]
- How to convert an int to a hex string?
- How to get the size of a string in Python?
- How to generate random strings in Python?
- How to convert a string list into an integer in python [duplicate]
- Convert list of strings to dictionary
- How do I check if raw input is integer in python 2.7?
- Sort list of strings by a part of the string
- Filter string data based on its string length
- Is there a way to split a string by every nth separator in Python?
- Python Remove Comma In Dollar Amount
- How do I escape curly-brace ({}) characters in a string while using .format (or an f-string)?
- How to replace whitespaces with underscore?
- How do I verify that a string only contains letters, numbers, underscores and dashes? [duplicate]
- Fast string array – Cython
- Python replace function [replace once]