xxxxxxxxxx
1. Using str.replace:
>>> "it is icy".replace("i", "")
't s cy'
2. Using str.translate:
>>> "it is icy".translate(None, "i")
't s cy'
3. Using Regular Expression:
>>> import re
>>> re.sub(r'i', "", "it is icy")
't s cy'
4. Using comprehension as a filter:
>>> "".join([char for char in "it is icy" if char != "i"])
't s cy'
5.Using filter function:
>>> "".join(filter(lambda char: char != "i", "it is icy"))
't s cy'