Работа с файлами в Python



from math import random

c = [c * 3 for c in 'list' if c != 'i']

c = [c + d for c in 'list' if c != 'i' for d in 'spam' if d != 'a']