Ask Your Question

Revision history [back]

After 5 questions, 4 answers and 43 point of karma, you are assumed to become autonomous with syntax errors ;)

If i put your code in a Sage session i get:

File "<ipython-input-7-54c6265f464d>", line 19
    for j lista_xy:
SyntaxError: invalid syntax

So, it means that your loop is not well defined, you should replace it by:

for j in lista_xy:

If i do this again, i got:

 File "<ipython-input-9-bf0cc464ad8d>", line 26
 SyntaxError: invalid syntax

Which is the problem @calc314 mentionned. As the name lineas suggests, you seem to build a list of lines, i guess that you meant:


Then your program seems to work. At least there are no syntax errors left, hence you can try to see whether the output looks like what you are looking for.