We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
if name == 'main':
def get_attribute(string,attribute):
count = 0
for i in string:
if getattr(i,attribute)() is True:
count +=1
if count>0:
print(True)
else:
print(False)
String Validators
You are viewing a single comment's thread. Return to all comments →
if name == 'main': def get_attribute(string,attribute): count = 0 for i in string: if getattr(i,attribute)() is True: count +=1 if count>0: print(True) else: print(False)