0
Python list sum,i met a problem
2 Answers
+ 1
Your 'print(i)' is outside of the function. In the main level of your code, 'i' is not known.
So you either have to print your 'i' while still in the function or you have to use 'return'.
+ 1
my problem has been solved, it's about indentation, thanks for HonFu