CodeSteps

Python, C, C++, C#, PowerShell, Android, Visual C++, Java ...

Author : Shijit

Python – Exception handling

Python provides an exception handling mechanism to handle the Exceptions when something went wrong in the Program. Python interpreter reads the code and throws an Exception when something went wrong; if the mechanism is provided to handle the Error, the Program execution continues, otherwise, the Program terminates. A very good example of an Exception is […]

Python – Numeric Types – float and complex Classes

In our previous article, we discussed int Class which deals with Integer numbers. In this article, I will explain float and complex classes. And these classes deal with floating point numbers and complex numbers respectively. float Class – Deals with Floating point numbers We can create floating point numbers using float() constructor. We can also […]

Python – Numeric Types – int Class

Numeric Types in Python are used to deal with numeric values. Python provides different classes to deal with numeric data; int, float, complex fractions and decimal are those classes. In this Article,  I will explain int class which is used to deal with integers. Let’s look at this class and usage of it in Python. int Class […]

Python – Truth Value Testing

Truth value testing verify whether the value is True or False. In Python, any object can be tested for Truth Value. What really the Truth Value is? True is the Truth value. But non boolean values doesn’t have true or false values. For example, numbers do not have true or false value. They are simply […]

Python – Sequence Types – Common Operations

Python supports variety of operations to work with Sequence Types. Almost all Sequence Types supports the common operations which we can apply on any of the Sequence Types what we have discussed in our Previous Articles. In this Article, I am going to explain some of the Common Operations Python supports for Sequence Types. in […]

Python – Sequence Types – Slicing

So far we have discussed the Sequence Types; list, tuple, range, str, bytes, bytearray and memoryview in Python. We have discussed creation of these types and accessing data from them. We have used index operator to access the data from the Sequence Types. By using index operator we can access ONLY one element at the given […]

Python – memoryview – A Quick Overview with Examples

Another interesting sequence type, Python provides is memoryview. This is completely different than the other sequence types so far discussed. Objects of memoryview class is allowed to access the internal memory of the objects where these objects are referencing.  In C language, it is possible to access the memory using pointer variables; in Python; we use […]

Scroll to top