I want to iterate over the elements ((a,b),(x,y)) so I tried:
def method(tuple): ((a,b),(x,y))= tuple for element in tuple: ..... But then I read another stackoverflow page which suggested something like this:
def method(tuple): ((a,b),(x,y))= tuple for element in tuple[0:4]: ..... Both resulted in the error: ValueError: need more than 1 value to unpack.
Is this action not allowed in python, or do I just have a syntax problem? I have checked the python docs as well.
Thanks for any advice.
Edit
map = ((1,0),(3,2)) def count(map): ((a,b),(x,y))= tuple inc=0 for element in tuple: inc+=1