Header Ads

Responsive Ads Here

Strings are Immutable

 Strings are Immutable



user_name = "Xtra"

# user_name[2] = "R"   -  Error

new_user_name = user_name.replace("r", "R")

print(new_user_name)
print(user_name)


user_name = "Coding"
print(user_name)

Powered by Blogger.