Run
# Given string x = "......,,hello world----...-" # Strip specified characters x_stripped = x.strip(".-,") print(f"Original : \"{x}\"") print(f"Stripped : \"{x_stripped}\"")
Output