In addition to the datetime and time modules, the Python standard library provides a module called calendar which, as the name suggests, offers calendar-related functions. One of them is of course displaying the calendar.
The datetime and time modules in Python
The datetime module provides classes for working with date and time. Date and time have countless uses and it’s probably hard to find a production application that doesn’t use them.
The os module in Python
A module called os lets you interact with the operating system using Python. It provides functions that are available on Unix and/or Windows systems. If you’re familiar with the command console, you’ll see that some functions give the same results as the commands available on the operating systems.
File processing in Python
Due to the type of the stream’s contents, all the streams are divided into text and binary streams. The text streams ones are structured in lines; that is, they contain typographical characters (letters, digits, punctuation, etc.) arranged in rows (lines), as seen with the naked eye when you look at the contents of the file in the editor. This file is written (or read) mostly character by character, or line by line.
Generators, iterators, lambdas and closures;
A Python generator is a piece of specialized code able to produce a series of values, and to control the iteration process. This is why generators are very often called iterators, and although some may find a very subtle distinction between these two, we’ll treat them as one.
Continue reading “Generators, iterators, lambdas and closures;”

