1
invalid syntax
GustavW (1)

Hi everyone.
I get "invalid syntax" on this:
for i in range(1, n)
print (t[i], F[i])
..where t, F and n of course are defined. Why the error message?

You are viewing a single comment. View All
Answered by JustARatherRidi (186) [earned 5 cycles]
View Answer
1
15adilw (0)

u need a colon after the for i in range(1,n) and an indent on the print(t[i],F[i])

1
GustavW (1)

@15adilw Thanks for the quick response. The weird thing is that a colon generates the invalid syntax message. Without the colon the print-thing gets the error.