remove char in python code example Example: delete certain characters from a string python for char in line: if char in " ?.!/;:": line.replace(char,'')