How python removes useless characters at both ends of a string
This article mainly introduces python how to delete useless characters at both ends of the string, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.
Delete useless characters at both ends of a string
Str1 = "Test" str2 = "/ / Test /" print (str1.strip ()) print (str2.strip ("/"))
Thank you for reading this article carefully. I hope the article "python how to delete useless characters at both ends of a string" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!