How to use one line of code to search for multiple suffixes of a string in python
This article mainly shows you "python how to use a line of code to search for multiple suffixes of a string", the content is easy to understand, well-organized, hope to help you solve your doubts, the following let the editor lead you to study and learn "python how to use a line of code to search multiple suffixes of a string" this article.
One line of code searches for multiple suffixes of a string
Print ("http://www.google.com".startswith(("http://","https://")))print("http://www.google.co.uk".endswith((".com",".co.uk")))#1-> True#2- > True" is all the content of the article "how to search for multiple suffixes of a string in python with one line of code". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!