num = 0
aho = []
for num in range(1, 41):
    if num % 3 == 0 or num // 10 == 3 or num % 10 == 3:
        aho.append('アホ')
    else:
        aho.append(num)
print(aho)

9ea0dbd2f412126745b070ef7f13e65ef2985c54
<mask token>

<mask token>
for num in range(1, 41):
    if num % 3 == 0 or num // 10 == 3 or num % 10 == 3:
        aho.append('アホ')
    else:
        aho.append(num)
print(aho)

num = 0
aho = []
for num in range(1, 41):
    if num % 3 == 0 or num // 10 == 3 or num % 10 == 3:
        aho.append('アホ')
    else:
        aho.append(num)
print(aho)
