Home
Press ? for keyboard navigation
❮
Change a string
String copy
❯
How to change a string
examples/strings/change_a_string.py
text
=
"abcd"
print
(
text
)
# abcd
text
=
text
[:
2
]
+
'Y'
+
text
[
3
:]
print
(
text
)
# abYd
Index (i)
Table of Contents (t)
Indexed keywords (k)
Chapter TOC (d)
Hide/Show (h)