Peter do the search before posting please, this topic has already been discussed.
In Python you can use the replace() and translate() methods to specify which characters you want to remove from the string and return a new modified string result. It is important to remember that love language test the original string will not be altered because strings are immutable. Here is the basic syntax for the replace() method.
With the replaceAll() method, you can use an empty String to remove a substring from a string. Syntax: string. replace(No. returns string after deleting the substring that begins at the nth character and is of length characters. If you omit length, or if length is greater than the number of characters from n to the end of string, the function deletes the rest of string (including the nth character). A string is a data structure in Python that represents a sequence of characters. It is an immutable data type, meaning that once you have created a string, you cannot change it.