Reading Time: 1 minutes!!!Under Construction!!!
Python
Python: Decorators
Reading Time: 1 minutesPython Decorators Python Decorators Decorators is a Python-exclusive feature, virtue of which you can define a function called a decorator function. This decorator function takes an object, manipulates it using […]
Python: Different Types of Arguments
Reading Time: 1 minutesTypes of Arguments in Python Functions Types of Arguments in Python Functions Arguments in Python functions are of three types: Positional Arguments Keyword Arguments Variable Length Arguments Positional Arguments The […]
Python: Comprehensions
Reading Time: 3 minutesPython Comprehensions Python Comprehensions Table of Contents List Comprehensions Using the if keyword inside a Comprehension Set Comprehensions Dictionary Comprehensions Comprehending Comprehensions with more than 1 for loop Generator Expressions […]
Python: Using builtin constructors map(), filter(), reduce()
Reading Time: 4 minutesmap, filter, reduce in Python map, filter, reduce in Python map() It is fairly common in programming to iterate over an iterable object, send each element to a function which […]
Python: Raising your own Exceptions: the raise keyword
Reading Time: 1 minutesRaising your own Exceptions in Python Raising your own Exceptions in Python The raise keyword is used to explicitly raise an exception. This is in contrast to when you make […]
Python: Manipulating Files
Reading Time: 1 minutesManipulating Files in Python Manipulating Files in Python The builtin open() function is used for opening files. This function returns a file object, which has methods like read() and write() […]
Python: Using iter() - The Iteration Protocol
Reading Time: 1 minutesUsing iter() in Python - The Iteration Protocol in Python Using iter() in Python - The Iteration Protocol in Python Sequences and file handlers in Python have an __iter__() magic […]
Python: Getting user input - builtin function input()
Reading Time: 1 minutesGetting user input in Python Getting user input in Python The builtin input() is used for receiving input from the user. The input() function takes an argument, which is what […]
Python: Handling exceptions - the try-except constructs
Reading Time: 1 minutesHandling exceptions in Python Handling exceptions in Python There are instances when your code doesn't go as planned. Python provides the try-except constructs to handle such situations. If a statement […]