I have a tuple which contains integers,strings and tuples(nested tuple). I want to check whether an element present in the tuple( in nested tuple also). this is what i have tried so far
tu=(1,'priya',2,(1,2,3,4),5,6,(7,'hi'),8,9)
if any('hi' in i for i in c for c in tu):
print("exists")
else:
print("does not exist")
it shows an error like this
if any('hi' in i for i in c for c in tu): NameError: name 'c' is not defined
kindly help