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.
Convert String to List in Python

Convert String to List in Python

While programming we may need to convert a string to a list in Python. That could be for any other reason. But, a question arises here, how can we convert a string to different forms of lists? So, here in…

Python ternary Operator Examples

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,…