Professional Documents
Culture Documents
Python For Og Lecture 13 Strings Are Immutable
Python For Og Lecture 13 Strings Are Immutable
Website - https://petroleumfromscratchin.wordpress.com/
LinkedIn - https://www.linkedin.com/company/petroleum-from-scratch
YouTube - https://www.youtube.com/channel/UC_lT10npISN5V32HDLAklsw
pfs.title()
print(pfs)
pfs.find('f')
7
/
1/30/2021 Python for O&G Lecture 13- Strings are Immutable - Colaboratory
pfs[7]
'f'
pfs[7] = 'F'
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-7-908ba4bf1f37> in <module>()
----> 1 pfs[7] = 'F'
pfs.replace('f', 'F')
print(pfs)
print(var)
/
1/30/2021 Python for O&G Lecture 13- Strings are Immutable - Colaboratory