Optimized list count
for a speedy count of multiple items in a (big) list, use the Counter module.
For big lists, Counter performs much faster (100x in my test cases) than
Product of lists
To create all possible combinations of the elements of two lists:
The product result is an iterable, so once it’s looped, can’t access it anymore (needs rewind). It is better to convert to a list. From here.
Remove non-ascii characters
Encode and decode
Join List of Strings With Separator
When changing a code inside a module, you need to reload the module if it was already imported: