Pankaj Kumar

Pankaj Kumar

I have been working on Python programming for more than 12 years. At AskPython, I share my learning on Python with other fellow developers.

Python ternary Operator Examples

Python doesn’t have a ternary operator. But, it supports writing an if-else statement in such a way that it works as a Python ternary operator. Why Python doesn’t have a special ternary operator? Many programming languages have ternary operators. But,…

Python Array – 13 Examples

Python doesn’t have explicit array data structure. It’s because we can do the same things with the List. The list contains a collection of items and it supports add/update/delete/search operations. That’s why there is not much use of a separate…

Python List Thumbnail

Python List – 15 Things You MUST Know

Python has four built-in data types data, set, tuple, dictionary, and list. These data types can store multiple collections of data. A set is an unordered collection of data, it is iterable, mutable, and has no duplicate elements. A tuple…