Difference between pass by value and pass by reference in Python

Introduction In Python, this question can be tricky specially if you come from a C++ background where pass by value and pass by reference is well defined. So what does that mean in Python? This question is repeatedly asked and answered online. My take on that is through the following example… Define 4 data types

Python read file line by line

Introduction Welcome to a new code snippet post. Today, we are going to demonstrate how to read a text file line by line in Python. There are various ways to do that, however we are going to show the recommended method specially when dealing with large files. Let us get started… Using with statement A