Mar-25-2024, 04:34 AM
Good evening!
I'm trying to find if an element of a set has a digit/digits as a part of an element.
I'm using ".isdigit" but it does not work...
I have to test the set if it has just one element or it is multiple element's set.
Tester_V
I'm trying to find if an element of a set has a digit/digits as a part of an element.
I'm using ".isdigit" but it does not work...
I have to test the set if it has just one element or it is multiple element's set.
vid_set = set(("apple", "banana", "banana","cherry","cher123ry")) if len(vid_set) > 1 : for e_vid in vid_set : print(' SET Element ',e_vid) if e_vid.isdigit(): print(f" MIxED ELEMENTs SET - > {e_vid}")Thank you.
Tester_V