del Command
☞To delete the string object :
Syntax :
Example :
S = "inspirewebsoft"
del S
print(S)
Output :
print(S)
NameError: name 'S' is not defined
Note : To remove elements of a particular index and to remove characters in string slice :
TypeError: 'str' object doesn't support item deletion