How is following construction called in Python? a = [n for n in range(100)]
Provided code is an example of list comprehension. List comprehension provides a concise way of creating new list from another iterable

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Python quizzes
Sign Up Now
or Subscribe for future quizzes