-1

Given the fact that I have two lists x,y each containing the x and y co-ordinated respectively that correspond to each point on every index of these lists. How do I create a list out of this ?

Meaning, x[0],y[0] correspond to one point, and x[1],y[1] correspond to another point.

Edit: I want to do it in bumpy

Siddharth Shah
  • 113
  • 4
  • 11

1 Answers1

1

Use zip

x = [1,2,3]
y = [7,8,9]

print zip(x, y)

# [(1, 7), (2, 8), (3, 9)]
furas
  • 134,197
  • 12
  • 106
  • 148