Home » Python (page 2)


Python strptime() Example

1. Introduction Consider the case when you have a string containing date information and you would need to extract the date information like the day, month, year, and so many other information. Imagine a string like “30-10-2019” and you realize that the first part is the day, followed by the month, then the year. Here is where the strptime() method ...

Read More »

Python String to Int Example

1. Introduction For me there is something beautiful about code. I like to think of it as “Digital Alchemy”. A very wise programmer once told me that the the “code never lies”. Oh how true that is. Coding can be brutal, humbling and it can also be incredibly rewarding. We all have our favourite programming languages. For whatever different reasons. ...

Read More »

Python String Append Example

1. Introduction This is an article about appending of string in python. In Python, string is an immutable object. You can use ‘+’ operator to append two strings to create a new string. There are various ways such as using join, format, stringIO and appending the strings with space. 2. Python String Appending In this section, we look at multiple ways of ...

Read More »