python exception

Python Exception-: An exception is an object generated automatically by Python functions with a raise statement. After the object is generated the raise statement which raises an exception, causes execution of the Python program to proceed in a manner different from what would normally occur. Instead of proceeding with the next statement after the raise or… Read More »

python modules

Python Modules-:  A module is a file containing code. It defines a group of Python functions or other objects and the name of the module is derived from the name of the file. Modules most often contain Python source code but they can also be compiled C or C++ object files. Compiled modules and Python… Read More »

python lambda

Python Lambda Function-: A lambda function is a small anonymous function in python. lambda expressions are anonymous little functions that we can quickly define inline. Normally a small function needs to be passed to another function like the key function used by a list’s sort method. In such cases a large function is usually unnecessary and… Read More »

python variables

Python Variables-: Like any other programming language python Variables are nothing but reserved memory locations to store values. This means that when we create a variable we reserve some space in memory. Based on the data type of a variable the interpreter allocates memory and decides what can be stored in the reserved memory. So we… Read More »

functions in python

Functions in Python-: Functions are the most important aspect of an application. A function can be defined as the organised block of reusable code which can be called whenever required. A function is a block of organised, reusable code that is used to perform a single related action. In other words we can say that the… Read More »

loops in python

Looping in Python-: Python provides a complete set of control-flow elements, with loops and conditionals. Sometimes we may need to alter the flow of the program. The execution of a specific code may need to be repeated several numbers of times. Like any other language Python has 3 type Loops While Loops For Loops If else loops… Read More »

dictionary python

Dictionary Python-: Dictionaries are powerful data structures, used for many purposes even within Python itself. Dictionary keys must be immutable, but any immutable object can be a dictionary key. Using keys means accessing collections of data more directly and with less code than many other solutions. Python’s name for associative arrays or maps which it implements… Read More »

format string python

Python Format String Method-: Python strings have powerful text-processing features, including searching and replacing, trimming characters, and changing case.Strings are immutable they can not be changed in place.Operations that appear to change strings actually return a copy with the changes. We know that this is the part of string. we can format strings in Python 3 in… Read More »

python string

Python String-:  Strings can be created by enclosing the character or the sequence of characters in the quotes. Python allows us to use single quotes, double quotes, or triple quotes to create the string.For example str=” welcome in python” String Method in Python-: Most of the Python string methods are built into the standard Python string class… Read More »

sets in python

Sets in Python-: A set in Python is an unordered collection of objects used when membership and uniqueness in the set are main things we need to know about that object. Like dictionary keys  the items in a set must be immutable and hash-able. This means that  floats, strings, and tuples can be members of a… Read More »