Python can check whether a string contain only letters with isalpha():
a_few = “abcdefghijk”
a_few.isalpha()
Truemixed = “abc45defg”
mixed.isalpha()
False
I have found Julia’s isletter() but it is limited to checking a single character.
How can Julia check for letters-only string?
10 posts - 4 participants