Please enable JavaScript to use CodeHS

CodeHS Glossary


List Comprehension Python

Python concept used to construct lists in a concise manner. For example, to produce a list where the items in `my_list= [1,2,3,4]` are doubled, the list comprehension would be: `new_list = [x*2 for x in my_list]`