Pradeep Elance has Published 446 Articles

The Null Object in Python

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:46:49

1K+ Views

Python does not have a null object. But the most closely related similar object is none. In this article, we will see how how None behaves in Python.Checking the type of Null and None we see that there is no Null Type and the None object is of type NoneType.Exampleprint(type(None)) ... Read More

Python Type Object

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:44:57

6K+ Views

Everything in Python is an object including classes. All classes are instances of a class called "type".The type object is also an instance of type class. You can inspect the inheritance hierarchy of class by examining the __bases__ attribute of a class object. type() method returns class type of the ... Read More

Python Code Objects

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:40:16

2K+ Views

Code objects are a low-level detail of the CPython implementation. Each one represents a chunk of executable code that hasn’t yet been bound into a function. Though code objects represent some piece of executable code, they are not, by themselves, directly callable. To execute a code object, you must use ... Read More

Python a += b is not always a = a + b

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:38:35

76 Views

If two variables are of the same data types and not iterators like list and dictionary etc, then the expressions a += b is same as a =+b gives the same result. But when n iterator is involved we can not always expect the same. Below is one of such ... Read More

Python __import__() function

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:35:37

271 Views

As we write python programs we need various other modules to leverage their functions, classes etc. in our current program. We can import those modules at the runtime using the import function. Though you can also import named modules at the beginning of the code, you may need the module ... Read More

Python - Drawing different shapes on PyGame window

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:34:34

251 Views

Pygame is a multimedia library for Python for making games and multimedia applications. In this article we will see how to use the pygame module to draws many different shapes on the screen taking into consideration, its height, width and position in the pygame window.In the below program we initialize ... Read More

Python - Display text to PyGame window

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:34:15

631 Views

Pygame is a multimedia library for Python for making games and multimedia applications. In this article we will see how to use the pygame module to get customized font and text on the screen taking into consideration, its height, width, and position in the pygame window.In the below program we ... Read More

Python - Display images with PyGame

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:29:48

1K+ Views

Pygame is a multimedia library for Python for making games and multimedia applications. In this article we will see how to use the pygame module to paint a picture on the screen taking into consideration, its height, width and position in the pygame window.In the below program we initialize the ... Read More

Python - Delete rows/columns from DataFrame using Pandas.drop()

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:29:31

705 Views

Pandas is one of the most popular python library for data analysis and data wrangling. In this article we will see how we can create a pandas dataframe and then delete some selective rows ort columns from this data frame.Deleting roewsIn the below example we have the iris.csv file which ... Read More

Python - Data visualization using Bokeh

Pradeep Elance

Pradeep Elance

Updated on 25-Jan-2021 07:25:18

144 Views

Bokeh is an python data visualization library for web browsers. It czncreate elegant, concise construction of versatile graphics. It is used to quickly and easily make interactive plots, dashboards, and data applications. In this article we will see how we can create various types of basic graphs using Bokeh.Plotting LinesWe ... Read More

Advertisements