Get the App
SLTechnology News&Howtos  ›  Development  › 

How python removes useless characters at both ends of a string

Shulou Source: shulou.com Published: 2022-06-01 05:29:08 10月04日 Update

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!

Tags: Characters articles both ends strings tests values interests at the same time more friends knowledge editing industry information information channels channels references learning help support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Linux Huawei MySQL Microsoft