CodeSteps

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

Python

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 […]

Python – bytes – A quick walk through with Examples

bytes is another sequence type in Python which holds sequence of bytes. Like strings, bytes also immutable; that means, once bytes objects are created; we are NOT ALLOWED to modify its’ content. Unlike strings, where it holds sequence of Unicode characters; bytes are ALLOWED ONLY ASCII characters. Each character in a bytes object have the […]

Python – Ranges – A walk through with Examples

A range is another sequence type in Python and it is a collection of numbers. We have discussed about Python’s sequence types; list and tuple sequence types through our previous Articles. In this Article, we will discuss about range sequence type. As I mentioned above, range is nothing but a collection or sequence of numbers; yes, […]

Scroll to top