Converting string into datetime in Python

Let\’s see how to convert a string with date and time information into a datetime object in Python. This conversion can be done using the datetime.strptime() method. First Example The first example expects a string with the following format: %b:…

time.sleep() in Python

To make a Python program delay its execution for a given time, you can use the the time.sleep() method. The time module has a number of methods to deal with time and sleep() is one of them. The sleep() method…

Running Oracle XE on Docker

Oracle XE is a free Oracle database that you can run locally and is very handy for development purposes. This post shows how to create a docker image with an instance of Oracle XE for you to manage and use…

Inheritance in Python

This is the 3rd article in a series on Object-Oriented Programming: Classes and Objects in Python Object-Oriented Programming: Encapsulation in Python Inheritance in Python Object-Oriented Programming: Polymorphism in Python Let’s define a generic Vehicle class and save it inside the…

Classes and Objects in Python

This is the 1st article in a series on Object-Oriented Programming: Classes and Objects in Python Object-Oriented Programming: Encapsulation in Python Inheritance in Python Object-Oriented Programming: Polymorphism in Python Classes and Objects are the fundamental concepts of Object-Oriented Programming. In…

Handling Exceptions in Python

Errors are a part of every programmer’s life and knowing how to deal with them is a skill on its own. The way Python deals with errors is called ‘Exception Handling’. If some piece of code runs into an error,…

Modules in Python

After some time the code starts to get more complex, with lots of functions and variables. To make it easier to organize the code we use Modules. A well-designed Module also has the advantage to be reusable, so you write…