How to get name of a tuple inside of a tuple

  python

Let’s say I have:

a = (1,2,3,4,5)
b = (2,4,5,6,7)
c = (a,b)

where a, b and c are tuples. How do I get the name of ‘a’ and ‘b’?
I was trying with:

for x in c:
    print(type(x).__name__)

but it gives me tuple

Source: Python Questions

LEAVE A COMMENT