2 תשובות
[ "boom" if "7" in str(x) or x%7==0 else x for x in range(1,50)]
print('\n'.join('boom'if 7==a%10else f'{a}'for a in range(1,50)))