Generate a list by list comprehension


Topic: Generate a list by list comprehension

Solution

list = [x for x in range(10)]
print(f"List Generated by list comprehension:{list}")



List all Python Programs