Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- text = input("Text: ")
- tmp = []
- def count(a):
- text.count(a)
- def delete(a):
- help = ''
- for i in range(len(text)):
- if(text[i] != a):
- tmp.append(text[i])
- for i in range(len(tmp)):
- help = help + tmp[i]
- print(help)
- def replace(a, withs):
- help = ''
- for i in range(len(text)):
- if(text[i] == a):
- tmp.append(withs)
- else:
- tmp.append(text[i])
- for i in range(len(tmp)):
- help = help + tmp[i]
- print(help)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement