Reading Time: 1 minutesCreating Secure Hashes/Message Digests in Python using hashlib module Creating Secure Hashes/Message Digests in Python using hashlib module The builtin hashlib module provides an interface to create secure hashes/message digests […]
Python: Using the nonlocal keyword
Reading Time: 1 minutesUsing the nonlocal keyword in Python Using the nonlocal keyword in Python The nonlocal keyword is used when you are dealing with variables with same name but in different scopes. […]
Python: Returning values from a function - The return keyword
Reading Time: 1 minutesreturn in Python return in Python The return statement makes the control exit from a function, with an optional expression. A return statement without an expression is as good as […]
Python: Retrieving Most Frequent Elements in an Iterable
Reading Time: 1 minutesRetrieving Most Frequent Elements in an Iterable in Python Retrieving Most Frequent Elements in an Iterable in Python The Counter class of builtin module collections creates a dictionary of all […]
Python: Changing Data Types - Type Casting
Reading Time: 1 minutesChanging Data Types - Type Casting in Python Changing Data Types - Type Casting in Python Python identifiers do not carry any information about their type while declaration. As soon […]
Python: Asserting values using assert keyword
Reading Time: 1 minutesAsserting values using assert keyword in Python Asserting values using assert keyword in Python It's hard to argue with the fact that all practical programs have bugs. It is better […]
Python: Terminating your program
Reading Time: 1 minutesTerminating your program in Python Terminating your program in Python In order to exit from a Python script/Interactive Interpreter Session/Command Prompt Session, any of the following functions can be used: […]
Python: Importing Modules - 4 types of imports
Reading Time: 1 minutesImporting Modules in Python Importing Modules in Python A Module(or package as they are referred as in other languages) is a collection of code accessible using an import statement. Simply […]
Python: Using the builtin function range()
Reading Time: 1 minutesUsing range() in Python Using range() in Python In a lot of situations, you may feel the need to obtain a list of numbers, such as in for loop. The […]
Python: Using the with keyword
Reading Time: 1 minutesUsing with keyword in Python Using with keyword in Python The with keyword automatically shuts down resources as soon as the code block following it is executed. It is considered […]

