3 ms·
Except you'd never write it like that in idiomatic Python. Your reduce's repeated list copying/appending/searching kills performance. Instead you would do somet
by stevesimmons 12y ago
Except you'd never write it like that in idiomatic Python. Your reduce's repeated list copying/appending/searching kills performance. Instead you would do something like this:
domains = set( email.split('@')[-1] for email in open(path) )
- innguest 12y agoHe's pretending python compiles to something sane. FP spoils you with great compilers.