r/ProgrammerHumor • • Aug 26 '20

Python goes brrrr

Post image
59.2k Upvotes

789 comments sorted by

View all comments

Show parent comments

756

u/delinka Aug 26 '20

Result should be ‘adbdcd aebece’. Someone needs to fix this.

425

u/itoshkov Aug 26 '20

Remove the white space and we have a deal. :)

164

u/[deleted] Aug 26 '20 edited Aug 26 '20

''.join(itertools.product('abc', 'de')) If you want me to fix it submit a ticket, thanks.

edit: Ticket assigned, standby.

import itertools as it ''.join(it.chain.from_iterable(it.product('abc', 'de')))

2

u/murtaza64 Aug 26 '20

Does * unpacking not work with non-sequence iterables?

→ More replies (4)