CodePudding user response:
To find prime Numbers saved to a list, the sum is not line?CodePudding user response:
Slist=[]
For the x in the range (1000) :
# judgment if x is a prime number, the print, if not a prime number is skipped
If x & lt; 2:
The continue
For I in range (2 x) :
If I==0 x % :
Break
The else:
Slist. Append (x)
Print (slist)
Print (sum (slist))