numpy.core.defchararray.isalpha (arr)
returns True for each item if all characters in the string are alphabetic and there is at least one character; otherwise returns false
Parameters:
arr: array_like of str or unicode.Returns: [ndarray] Output array of bools.
Code # 1:
|
Output:
Input array: [’abcd’’ ac1bd’ ’abdc’’ dcba’ ’ab cd’] Output array: [True False True True False]
Code # 2:
|
Exit:
Input array: [’geeks’’ for’ ’geeks’’ wow! ’] Output array: [True True True False]