from random import randint
n = 20
a = [randint(0,100) for _ in range(n)]
print(a)
mean = sum(a)/len(a)
for i in range(len(a)):
if a[i] < mean: a[i] = 0
elif a[i] > mean: a[i] = 10
import random
s = [random.randint(-100, 100) for i in range(20)]
res = sum(s)/20
print('Изначальный :' ,*s)
print('Стало :', *[(lambda x: 0 if x < res else 10)(s[i]) for i in range(20)])
from random import randint
n = 20
a = [randint(0,100) for _ in range(n)]
print(a)
mean = sum(a)/len(a)
for i in range(len(a)):
if a[i] < mean: a[i] = 0
elif a[i] > mean: a[i] = 10
print(a)
import random
s = [random.randint(-100, 100) for i in range(20)]
res = sum(s)/20
print('Изначальный :' ,*s)
print('Стало :', *[(lambda x: 0 if x < res else 10)(s[i]) for i in range(20)])