The release of Python 3.6 came with exciting functionalities. I want to speak about the feature called interpolated format string – f-strings for short- through this quick post. This new feature allows us to have a more readable, concise and even faster way of formatting string, in short words: pythonic code.
Category: Python
Getting the last modified directory with Python
Working with os paths is a prevalent task, especially when working on a console application in Python. Recently, I had to add a change to an existing feature where it was mandatory to return the last modified directory on a specific target. In Python, we have the opportunity to count with different libraries; in this…
An introduction to pathlib module of Python
First at all, I would like to clarify something that maybe sounds evident, but sometimes we forget, the path is not a string, it is a fact that we must keep in mind to avoid headaches in our journey in Python. Since Python 3.4 in advance, we count on a powerful and versatile module called…
Python Lambda and Regex – A good team for replacing a string using dictionaries
The aim of this post is to show you a specific and useful tip in Python for replacing strings with matched values contained in a dictionary, for this task that could sound trivial but in the practice may represent an interesting challenge.