string function in python
#string function
story = "once upon a time there was a boy name nilabhru learn coding"
print(len(story))
print(story. endswith("coding"))
print(story.count("o"))
print(story.capitalize())
print(story.find("time"))
print(story.replace("nilabhru","code with nayan"))
print(story.replace("nilabhru","code with nayan"))
Comments
Post a Comment