Python Colon Operator

Python Colon Operator(:) The colon(:) symbol is used for multiple purposes in Python As slice operator in list, tuple, and string data type. It is also used in if, while, …

Read more

Python Tuples

Python Tuples   Tuple is immutable. It is declared with parenthesis (). It is an ordered sequence of items same as a list. They are similar to a list. The …

Read more

Python One-line if-else Statements

Python One-line if-else Statements:   The conditional operator – also known as the ternary operator – is an alternative form of the if/else statement that helps you to write conditional …

Read more

Python Multi-line Statements

Python Multi-line Statements: Python already contains a lot of advanced features and functions to make programming easy to understand. Similarly, python gives us an option to make multiple line statements …

Read more

Python Star or Asterisk Operator

Python Star/Asterisk Operator(*):   It means, multiple values can be stored inside that variables. In function “*” allows you to consume all remaining arguments. It allows an unspecified number of …

Read more

Python While loops

  We use while loop when we dont know the exact count of iteration for a particular condition. While Loop Syntax: As long as a condition is true , we …

Read more

Python Pass Statement

Pass is a keyword. The pass statement is basically a null statement. Pass Statement is used when a statement is required syntactically. Nothing happens when the pass statement is executed. …

Read more

Python If-Else

The if-else statement is used in python for decision making. If Statements: Syntax if(condition): statement(s) If Examples: 01. Example x=2 if x>10: print(“Number is greater than 10.”) print(‘This will always …

Read more

Python Lambda Functions

Lambda function is a function without a name. Lambda function is also known as an anonymous function. They are defined using lambda keyword. Lambda functions are used extensively along with …

Read more