- Trending Categories
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 498 Articles

Pradeep Elance
4K+ 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
257 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
188 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
385 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
389 Views
Comparing dates and times is a very crucial requirement in any programming language. Python has a datetime library which has many inbuilt functions to use date and time. Interestingly date and time can also be compared like mathematical comparison between various numbers.ExampleIn the below example we have chosen to dates ... Read More

Pradeep Elance
74 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
760 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
156 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

Pradeep Elance
329 Views
As computers can only store bytes of data, we need to convert various data formats in byte data format. For example images to become bytes, are stored with PNG, JPEG etc. Similarly music is stored as .WAV, .MP3 etc. The software responsible for creating and managing this formats do the ... Read More

Pradeep Elance
108 Views
The bool() in python returns a boolean value of the parameter supplied to it. The parameter can be any of the following and the results are as per the below conditions. Except the values mentioned here the remaining values return True.False is returned when the parameter value passed is as ... Read More