The char.islower()
function in Python returns True
for each element of an input array of strings. This happens if all the cased characters in the string are lowercase and there is at least one cased character. Otherwise, the function returns False
.
char.islower(a)
The char.islower()
function takes a single parameter value, a
, which represents the input array of strings.
The char.islower()
function returns an output array of boolean values with the same shape as the input array a
.
import numpy as np# creating an input arraya = np.array(['HELLO', "hello", "HI", "hi", "A", "a"])# implementing the char.islower() functionmyarray = np.char.islower(a)# printing the input arrayprint(a)# printing the output arraysprint(myarray)
numpy
module.a
using the array()
function.char.islower()
function on the input array. The result is assigned to the myarray
variable.a
.myarray
output array.