List and dictionary comprehensions in Python

List Comprehension

List comprehension is an elegant way of creating a new list from an existing list. Let us understand Python’s list comprehension using examples.

Example…

Dr. Soumen Atta, Ph.D.

Postdoctoral Researcher at Laboratoire des Sciences du Numérique de Nantes (LS2N), Université de Nantes, IMT Atlantique, Nantes, France.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store