Skip to content
Advertisement

How can I check if a string contains ANY letters from the alphabet?

What is best pure Python implementation to check if a string contains ANY letters from the alphabet?

JavaScript

Where string_1 would return False for having no letters of the alphabet in it and string_2 would return True for having letter.

Advertisement

Answer

Regex should be a fast approach:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement