Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # break_list_comprehension.py -- it actually has a very odd purpose
- a = 'abc123xyz'
- b = 'abc123zzz'
- c = ''.join(list(next(iter([])) if a[x]<>b[x] else a[:x+1][-1] for x in range(len(b))))
- print c
Add Comment
Please, Sign In to add comment