4 ms·
I'm fairly sure `open` is a generator and doesn't load the whole file into memory. So you wouldn't hit a memory error unless like you said the amount of unique
by aleksiy123 4y ago
I'm fairly sure `open` is a generator and doesn't load the whole file into memory. So you wouldn't hit a memory error unless like you said the amount of unique words is high enough.
- t43562 4y agoI think you're right but I believe that wrapping it in List(...) is where that would force the whole file into memory.
- aleksiy123 4y agoYeah, you're right, that's my mistake. I think you can just omit it but yeah...