# Python program to remove a character from a string using translate() method text= '_User_' print(text.translate({ord('_'):None}))