Here are some examples showing the differences between the function of "strip()" and "replace()" in Python.
Be careful! strip() will delete any character in the beginning or end of the word that matches "any" character in the word we put in the strip function. For example, we put "& quot;" as a parameter into strip(), then any character matches ('&', 'q', 'u', 'o', 't', ';') will be deleted. It doesn't have to be exactly the same "string."
Be careful! strip() will delete any character in the beginning or end of the word that matches "any" character in the word we put in the strip function. For example, we put "& quot;" as a parameter into strip(), then any character matches ('&', 'q', 'u', 'o', 't', ';') will be deleted. It doesn't have to be exactly the same "string."
Thanks for this! Very clear and informative!
ReplyDeleteNice site. On your blogs very interest and i will tell a friends. https://python.engineering/pandas-for-everyone-python-data-analysis/
ReplyDelete