Python List interpretation (w/ Turtles)
Question: Little python question, how to make the turtle move according to `[(160, 20),
(-43, 10), (270, 8), (-43, 12)]` where the first number is the angle turned
and the second is distance traveled.

My attempt:

    
    
    print('Question 11')
    import turtle
    
    wn = turtle.Screen()
    wn.bgcolor("hot pink")
    tess = turtle.Turtle()
    tess.shape("turtle")
    tess.color("blue")
    
    def path(x):
        for a, b in len(x): # Not so sure about this line.
          tess.forward(a)
          tess.right(b)
    l = [(160, 20), (-43, 10), (270, 8), (-43, 12)]
    path(l)
    wn.mainloop()
    

Errors I have gotten:

> TypeError: 'list' object cannot be interpreted as an integer

and

> TypeError: 'int' object is not iterable


Answer: I'm not familiar with turtle, but the follow line:

    
    
    for a, b in len(x): # Not so sure about this line.
    

this line is wrong: x as the follow code means a list. len(x) returns an
integer, but integer is not iterable.

which you means:

    
    
    for a, b in x:
    

instead your code.

