We can add elements to a list using the append method. The method adds a single element towards the end of a list.

Example Of The .append() Method

For example, let’s extend the string by adding “April” to the list with the method . …

Tuples are made of several items, just like a list, but they cannot be modified in any way. They are widely used internally in many of the systems we depend on, like databases. …

Python string method inputs a string value & outputs a list of words contained within the string by separating or splitting the words on all the whitespaces by default. It also has an optional argument for limiting the number of splits.

The method converts the string into other…

are conditional statements that provide us with the decision making that is required when we want to execute code based on a particular condition.

The statement used in Python helps automate that decision making process.

if Condition

The condition is considered the simplest of the three & makes a…

In Python, we can use a list function which creates a collection that can be manipulated for our analysis. This collection of data is called a list object.

While all methods are functions in Python, not all functions are methods. There is a key difference between functions & methods in…

Numpy’s random module, a suite of functions based on pseudorandom number generation. Random means something that can not be predicted logically.


In this example, we will stimulate a coin flip. We will use the function np.random(), …

Python’s rename column is a method used to change the column nambes with Pandas’ rename function. It’s useful when we load a tabular dataset that has no column names or if we want to assign different names to specific columns.


Its syntax is given as:

When working with data, we are often going to need to count items, create dictionaries values before we know keys to store them in, or maintain order in a dictionary.

is a powerful tool for counting, validating, & learning more about the elements within a dataset that is found…

Just like in mathematics, programming languages like Python have operators. We can think of them as extremely simple functions that lie at the basis of computer science. These are the simplest operations to which a computer program can be reduced. …


What Is String Formatting?

String formatting is attractively designing our string using formatting techniques provided by the particular programming language. We have different string formatting techniques in Python. We are now going to explore the new f-string formatting technique.

f-string evaluates at runtime of the program. …

Jason Joseph

Data Scientist & Machine Learning Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store