What the problem with my code ? Please help I tried several ide but still get same problem https://i.stack.imgur.com/KPRqA.jpg
-
1Put a minimal reproducible example in the question, as text– jonrsharpeMar 11, 2020 at 22:55
-
Please do not share information as images unless absolutely necessary. See: meta.stackoverflow.com/questions/303812/…, idownvotedbecau.se/imageofcode, idownvotedbecau.se/imageofanexception.– AMCMar 11, 2020 at 23:03
-
What does it's not correct mean, exactly?– AMCMar 11, 2020 at 23:04
Add a comment
|
2 Answers
Declare a=[]
outside the for loop to get all your elements added to your list
-
1
What are you trying to do? We can't help if we don't know your end goal.
you can try putting a outside of the loop and set:
for i in range(0, x):
instead of just numbers in a parenthesis.