A Guide to Writing Comments in Python

Reading Time: 4 minutes

What is a Comment?

python-logo

In simple terms, a comment is an entry added to the source code to allow a deeper understanding of the logic behind why the code was written the way it was. In Python, the ‘#’ or pound symbol is required before every comment. This symbol allows the Python interpreter or compiler to ignore the pursuant text. 

Why are Comments Needed?

When working in a large codebase, a developer may need to refer back to the information in comments weeks or months later to ensure that they understand the code’s original purpose. This information is necessary for the original idea’s formal logic aspect and is an essential criterion when working with other developers on an extensive project. 

Continue reading “A Guide to Writing Comments in Python”

What Is a Python Function? A Tutorial

Reading Time: 7 minutes
python functions

What is a Python Function? 

In this tutorial, we discuss one of the most useful attributes of Python: the function. Python functions are considered “First Class” objects. A First Class object can be assigned to variables, stored in data structures, passed as arguments to other functions, or even return values from other functions. Other examples of First Class objects in Python are integers, strings, and dictionaries.

Continue reading “What Is a Python Function? A Tutorial”