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 Keywords: List and How to Check

Python Keywords: List and How to Check

Choosing a name in Python starts with checking whether the language reserves that spelling. The standard-library keyword module checks hard keywords and soft keywords, whose grammar role depends on context. I’ll show you how to check both categories in the…

How to Sort a Python List

How to Sort a Python List

When a list’s values are out of order, sorting puts them in the order Python compares them. Python’s list.sort() changes the list itself, while sorted() returns a new sorted list and leaves the source unchanged. I’ll show how to sort…

Python Data Types

Python Data Types

A Python variable can refer to values of different types, and you may need to check one before using it. A data type identifies the class of a value and the operations that class supports. I’ll explain what Python data…