- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Pradeep Elance has Published 446 Articles
Pradeep Elance
263 Views
In any programming language we find a situation where exceptions are raised. Python has many inbuilt exception handling mechanisms. There are errors which are handled by this exception names. Python also has a block called finally which is executed irrespective of whether the exception is handled or not.Syntaxtry: # ... Read More
Pradeep Elance
2K+ Views
Lists are the most frequently used data structures of python. When we want to add more elements to a list, the extension of list happens. This can be done in following 5 different ways.Using the Plus operatorHere we simply add the elements of a new list using the + operator. ... Read More
Pradeep Elance
1K+ Views
The divmod() is part of python’s standard library which takes two numbers as parameters and gives the quotient and remainder of their division as a tuple. It is useful in many mathematical applications like checking for divisibility of numbers and establishing if a number is prime or not.SyntaxSyntax: divmod(a, b) ... Read More
Pradeep Elance
5K+ Views
Clearing up all the elements in a python list can be done in many ways. Below are the some of the methods which are implemented to achieve this.using clear()This function is a part of standard library and empties the python list completely.Syntax: list_name.clear() list_name is the name of the list ... Read More
Pradeep Elance
352 Views
These two functions are used to remove attributes from classes. The delattr() allows dynamoc deletion of attribute while the del() is more efficient explicit in deleting the attribute.Using delattr()Syntax: delattr(object_name, attribute_name) Where object name is the name of the object, instantiated form the class. Attribute_name is the name of the ... Read More
Pradeep Elance
228 Views
As python allows duplicate elements in a list we can have one element present multiple Times. The frequency of elements in a list indicates how many times an element occurs in a list. In this article we use the Counter function of the collections module to find out the frequency ... Read More
Pradeep Elance
452 Views
In a list in Python we may have duplicate elements. When we count the length of the list we get the total length including the duplicate elements. But in this article we will see how to get the total count of the distinct elements or unique elements in a list.ExampleIn ... Read More
Pradeep Elance
92 Views
This function is helpful in converting the letters of a word into lowercase. When applied to two strings it can match their values irrespective of the type up of the case of the letters.Applying casefold()The below example we apply the casefold() function to a string and the result comes out ... Read More
Pradeep Elance
909 Views
A pandas dataframe is similar to a table with rows and columns. Sometimes we may have a need of capitalizing the first letters of one column in the dataframe which can be achieved by the following methods.Creating a DataframeIn the below example we first create a dataframe with column names ... Read More
Pradeep Elance
238 Views
The callable() function in python is part of its standard library which returns true if the object is callable and returns false if it is not.The object itself should have a call method to be callable. For example if we just declare a variable with value, it is not callable, ... Read More