Sometimes, we want to do a case-insensitive string comparison with Python. In this article, we’ll…
Coding
Sometimes, we want to remove accents (normalize) in a Python unicode string. In this article,…
Sometimes, we want to read streaming input from Python subprocess.communicate() method. In this article, we’ll…
Sometimes, we want to replace multiple substrings of a string in Python. In this article,…
Sometimes, we want to select items randomly but weighted by probability with Python. In this…
Sometimes, we want to parse data in JSON format with Python. In this article, we’ll…
Sometimes, we want to use a regular expression match a whole word with Python. In…
Sometimes, we want to use if/else in a list comprehension in Python. In this article,…
Sometimes, we want to create a dictionary with list comprehension with Python. In this article,…
Sometimes, we want to sort a list of tuples by the element at a given…