Answers for "python remove occurences of char"

3

How to remove all characters after a specific character in python?

text = input()
sep = '...'
stripped = text.split(sep, 1)[0]
print(stripped)
Posted by: Guest on August-31-2021
0

Python Remove all occurrences of a character from a string

# Python program to remove all occurrences of a character from a string
text= 'Welcome, to, Python, World'
print(text.replace(',',''))
Posted by: Guest on December-08-2021

Code answers related to "python remove occurences of char"

Python Answers by Framework

Browse Popular Code Answers by Language