from random import randint
a = [randint(-10,10) for i in range(7)]
print(a)
for i in range(len(a)):
if a[i] > 0:
a[i] = 0
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
from random import randint
a = [randint(-10,10) for i in range(7)]
print(a)
for i in range(len(a)):
if a[i] > 0:
a[i] = 0
print(a)