Капранов Степан Сергеевич 427 CopyPaste 1689 | Земцов Марк, 420 группа CopyPaste 1415 | ||||
---|---|---|---|---|---|
f | 1 | import ast | f | 1 | import ast |
2 | 2 | ||||
t | 3 | def copypaste(one, two): | t | 3 | def copypaste(A, B): |
4 | for first, second in zip(ast.walk(ast.parse(one)), ast.walk(ast.parse(two))): | 4 | for a_el, b_el in zip(ast.walk(ast.parse(A)), ast.walk(ast.parse(B))): | ||
5 | if type(first) != type(second): | 5 | if type(a_el) != type(b_el): | ||
6 | return False | 6 | return False | ||
7 | return True | 7 | return True |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|