To clear or remove a string, you assign an empty string or use the del statement, respectively: : Assignment « String « Python Tutorial






aString = ''
print aString
del 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: