Ответ:
lst = [15 - 7 * i for i in range(1, 16)]
lst = [100 if i % 5 == 0 else i for i in lst]
print(*lst)
Объяснение:
Русскоязычная документация по list comrehension - highload.today/comprehensions-python/
a = [15-7*i for i in range(15)]
print(a)
for i in range(15):
if(a[i]%5==0):
a[i]=100
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
lst = [15 - 7 * i for i in range(1, 16)]
lst = [100 if i % 5 == 0 else i for i in lst]
print(*lst)
Объяснение:
Русскоязычная документация по list comrehension - highload.today/comprehensions-python/
Ответ:
a = [15-7*i for i in range(15)]
print(a)
for i in range(15):
if(a[i]%5==0):
a[i]=100
print(a)
Объяснение: