Issue
I want to sort out all Numbers under 0 in a List and add to the numbers under 0 + 500.
import random
from turtle import st
startFrame = random.randint(0, 200)
print(startFrame)
start = []
for i in range(startFrame -125, startFrame):
start.append(i)
print(start)
for Frame in start:
if Frame > 0:
Frame + 500
print(start)
Did anyone can find out why its not working?
Solution
Just do the following:
for i in range(len(start)):
if start[i] < 0:
start[i] += 500
print(start)
Answered By - Nick
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.