How to Remove Characters and Strings : Assignment « String « Python Tutorial






aString = 'Hello World!'
aString = aString[:3] + aString[4:]
print aString








5.2.Assignment
5.2.1.How to Update Strings
5.2.2.How to Remove Characters and Strings
5.2.3.To clear or remove a string, you assign an empty string or use the del statement, respectively: