Kód
# Hárommal osztható számok törlése
# https://www.youtube.com/watch?v=6WUeCkVH2wA
import random
szamok = [random.randint(1,500) for i in range(100)]
print(sorted(szamok))
print("")
for szam in szamok:
if szam % 3 == 0:
szamok.remove(szam)
print(f"A hárommal oszthatóaktól mentes lista:\n{sorted(szamok)}")