python3 list comprehension for nested lists code example Example: python nested list comprehension matrix = [[j for j in range(5)] for i in range(5)]