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 Standard Library Modules for Common Tasks

Python Standard Library Modules for Common Tasks

Before installing a package for a small job, it helps to know what Python already includes. The standard library is a collection of modules that Python distributes for common programming tasks. I’ll explain how standard-library modules differ from separately installed…

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…