Python for loop

Python For Loop: Python For Loop is a loop statement which can be used in various forms to execute a block of code continuously as long as the condition of the loop is true, and stops only when the condition fails. These are: For Loop : For loop is used to execute a group of … Read more

Python nested If

Python nested If: Python If Else statement is a conditional statement, which can be used in various forms to check a condition or multiple conditions and to perform the specified action or actions, if the particular condition is true. These are: ..elif….else or nested if: If elif else statement is used to perform different actions … Read more

Python If else

Python If Else: Python If Else statement is a conditional statement, which can be used in various forms to check a condition or multiple conditions and to perform the specified action or actions, if the particular condition is true. ..else: If else statement is used to perform an action if a single condition is true … Read more

Python If

Python If: Python If statement is a conditional statement, which can be used in various forms to check a condition or multiple conditions and to perform the specified action or actions, if the particular condition is true. These are: if statement if-else statement nested if statement if statement: If statement is used to perform an … Read more

Python Comments

Python Comments: Python comments are used to give a brief description about any specific line of code or about a module in the code to make the code more user-friendly. Python Comments can be of two types: Single line Comments Multi line Comments Single Line Comments: Single line comments starts with # in Python. Multi … Read more

Python Operators

Python Operators: Python Operators are used to perform operations on operands. Operands can be a variable or a constant. The operators are divided into seven groups on the basis of the basic operations they perform. Arithmetic Operators: The operators which are used to perform the arithmetical operations, are grouped together as Arithmetic operators. Operators Symbol … Read more

Python Literals

Python Literals: Literals are the constant values or the variable values used in a Python code. There are mainly five types of literals used in PYTHON: String Literals Numeric Literals Boolean Literals Special Literals Collection Literals String literals: In Python, String literals are characterised either by single quotation marks, or double quotation marks surrounding them. … Read more

Python Identifiers

Python Identifiers: All the variables, class, object, functions, lists, dictionaries etc. in Python are together termed as Python Identifiers. Identifiers are the basis of any Python program. Almost every Python Code uses some or other identifiers. Rules for using Python Identifiers: An identifier name should not be a keyword. An identifier name can begin with … Read more

Python Keywords

Python Keywords: There is a list of words already defined in Python library. These reserved words are called as Python Keywords. Every keyword is defined to serve a specific purpose. These keywords when used in Python codes performs a specific operation during compilation. A Keyword in Python is restricted to be used as a variable, … Read more

Python Variables

Python Variables: Variables are used in python to hold a value at a memory location. Python is a type infer language, i.e the data type of the variables do not need to be declared. It automatically detects the types in accordance with the variable value. Creating a variable is also not a tedious task in … Read more