Category Archives

Python Itertools

Python’s Itertool is a module that provides various functions that work on iterators to produce complex iterators. This module...

Python Itertools

Python’s Itertool is a module that provides various functions that work on iterators to produce complex iterators. This module...

Using Iterations in Python Effectively

C-style approach:This approach requires prior knowledge of total number of iterations. # A C-style way of accessing list elements...

Using Iterations in Python Effectively

C-style approach:This approach requires prior knowledge of total number of iterations. # A C-style way of accessing list elements...

Switch Case in Python (Replacement)

What is the replacement of Switch Case in Python ? Unlike every other programming language we have used before,...

Switch Case in Python (Replacement)

What is the replacement of Switch Case in Python ? Unlike every other programming language we have used before,...

Chaining comparison operators in Python

Checking more than two conditions is very common in Programming Languages. Let say we want to check below condition:...

Chaining comparison operators in Python

Checking more than two conditions is very common in Programming Languages. Let say we want to check below condition:...

Programs for printing pyramid patterns in Python

Patterns can be printed in python using simple for loops. First outer loop is used to handle number of...

Programs for printing pyramid patterns in Python

Patterns can be printed in python using simple for loops. First outer loop is used to handle number of...

range() vs xrange() in Python

range() and xrange() are two functions that could be used to iterate a certain number of times in for...

range() vs xrange() in Python

range() and xrange() are two functions that could be used to iterate a certain number of times in for...

Looping Techniques in Python

Python supports various looping techniques by certain inbuilt functions, in various sequential containers. These methods are primarily very useful...

Looping Techniques in Python

Python supports various looping techniques by certain inbuilt functions, in various sequential containers. These methods are primarily very useful...

Loops and Control Statements (continue, break and pass) in Python

Python programming language provides following types of loops to handle looping requirements. While Loop Syntax : while expression: statement(s)...

Loops and Control Statements (continue, break and pass) in Python

Python programming language provides following types of loops to handle looping requirements. While Loop Syntax : while expression: statement(s)...