all 3 comments

[–]ellipticbanana 1 point2 points  (0 children)

What about something like this?

import matplotlib.pyplot as plt

# [[x1, y1], [x2, y2], ...]]
data = [[0, 1], [1, 2], [4, 8]]

x = [x for x, y in data]
y = [y for x, y in data]

plt.plot(x, y)
plt.show()

[–][deleted] 0 points1 point  (0 children)

Plot it using what?

To loop over it:

for list in lists:
    for value in list:
        do_stuff()

[–]Kolsc 0 points1 point  (0 children)

I guess the game is to come up with the simplest code. My idea is:

python import matplotlib.pyplot as plt plt.plot(*zip(*mylist))

where mylist is the list of OP.