I was iterating over a List and print each element, the code is very simply, but the program throws error.
Asked
Active
Viewed 30 times
-4
-
1don't post screenshots, copy and paste code and error instead please. – Julien Oct 17 '17 at 03:26
-
1I assume you redefined the `print` keyword as an integer in your code before... – Julien Oct 17 '17 at 03:27
-
@Julien Never define *print* keyword anywhere else, anyway restarting Jupyter kernel solved the issue. – Shawn TIAN Oct 17 '17 at 03:38
1 Answers
0
You have redefined print
somewhere else in your code. You can test this by simply running:
print
It will likely give you an integer. Try resetting your kernel.

James
- 32,991
- 4
- 47
- 70
-
It's weird that I didn't define **print** anywhere, nevertheless, restarting kernel works, thanks. – Shawn TIAN Oct 17 '17 at 03:40