From time to time, a very common task might be to get the file name, extension, parent folder, or checking the exitance of a file or file list. In Python, this can be done by the in-built os.path library. Here is how!
Sometimes, you may want to get the variable name itself as a string while writing Python code. For instance, if you are going to write 'a = 2', is there a convenient way of getting the variable name '"a"' by calling a function using 'a' as the parameter?
The short answer is YES.
It's a very common task that you may need the current date and time as a string, which can then be assigned as a timestamp for logging, intermidiate input deck generation, etc. In Python, there are several modules available to achieve this, such as date, time, datetime - well, it looks redudent here! The easierest way might be using the time module.