Algorithms, functions, classes, regular expressions, iterators, generators, OOP, exceptions, NumPy, pandas, scikit-learn
https://telega.in/c/python_tasks
Questions — @dina_ladnyuk
Post #2261
1.45K
Что выведет код?
line = 'aaa bbb ccc d e f'
g1 = ''.join(x.upper() for x in line.split() if len(x) > 1)
def gen(line):
for x in line.split():
if len (x) > 1:
yield x.upper()
g2 = ''.join(gen(line))
print(g1 == g2)