List Comprehension in Python

List comprehension in python is one of the best features present in python.

List Comprehension in python

As we all know, a lot of work done in a lot fewer lines of code in python. This usually speeds up development.

List comprehensions provide a concise way to create lists using for clause, then zero or more for or if clauses depending on your needs.… Read more

Lists in Python

In this post, we will learn about lists in python and how to use them in detail.

We got an overview of lists in python in the Python Basics tutorial’s part 8 (sequences). Make sure you check that out first if you haven’t already.

Lists in Python

Lists can be thought of as dynamic sized arrays (like Java’s ‘ArrayList’ or C++’s ‘Vector’).… Read more

Connect to a MySQL database in Python

Here, we will learn to connect to a MySQL database in python with the help of a library called “PyMySQL“. You would need some knowledge of writing SQL queries to proceed.

PyMySQL is basically to an obsolete library “MySQLdb” which was also used to connect to MySQL databases.

The python DB-API is a specification for a common interface to relational databases like MySQL and Oracle. The… Read more