Python Programming

Python is one of the most widely used programming languages. It’s getting a lot of popularity these days because of so many Python frameworks in IoT, Machine Learning, Deep Learning, and Artificial Intelligent space.

These Python Tutorials will help you in getting mastery over the Python Programming. The tips and tricks shared by us will enable you to write pythonic code with high performance, reusability, readability, and maintainability.

Python break Statement

The break statement in Python is used to get out of the current loop. We can’t use break statement outside the loop, it will throw an error as “SyntaxError: ‘break’ outside loop“. We can use break statement with for loop and while loops. If the break statement is present in a nested loop, it terminates […]

Python break Statement Read More »

Python while Loop

Python while loop is used to repeat a block of code until the specified condition is False. The while loop is used when we don’t know the number of times the code block has to execute. We should take proper care in writing while loop condition if the condition never returns False, the while loop

Python while Loop Read More »

Python for Loop

Python for loop is used to iterate over an iterable. Any object that returns its elements one by one to be iterated over a for loop is called Iterable in Python. Some of the common examples of iterables are List, Tuple, and String. The for loop is the core building block of python programming. Implementing

Python for Loop Read More »

Python if else elif Statement

Python if-elif-else statement is used to write a conditional flow code. The statements are in the order of if…elif…else. The ‘elif’ is short for ‘else if’ statement. It’s shortened to reduce excessive indentation. The else and elif statements are optional. There can be multiple elif statements. We can have only one else block for an

Python if else elif Statement Read More »

Python Functions

Functions in Python is a block of code with a name. We can call a function by its name and the code inside the function block will be executed. We can’t use reserved keywords as the function name. A function name must follow the Python identifiers definition rules. Function Parameters We can pass some data

Python Functions Read More »

Python Operators

Operators in Python are used to perform a specific operation on variables and values. Python has a lot of operators that are either keywords or special characters. The values or variables on which these operators work are called operands. Types of Python Operators Python operators can be classified into the following categories. Arithmetic Operators Logical

Python Operators Read More »

Python Data Types

Python is an object-oriented programming language. Every variable in Python is an instance of some class. There are many pre-defined Python data types. We can create our own classes to define custom data types in Python. What are the Popular Data Types in Python? Some of the popular data types in Python are: Numbers –

Python Data Types Read More »

Python Docstring

Python Docstring (Document String) is a string literal that is the first statement in a module, function, class, or method. How to Write a Python Docstring? Python docstring is surrounded by a pair of triple double-quotes (“””). Let’s look at some examples of writing docstrings in Python. 1. Python Function Docstring Example 2. Python Class

Python Docstring Read More »