Advertisement
HasteBin0

Convert an Import List into an Item Tuple

Oct 9th, 2020
1,055
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. gi = lambda imports_text: print('(\n{}\n)'.format(',\n'.join(filter(None, (x.split('import')[1] for x in imports_text.split('\n') if 'import' in x)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement