how to use list comprehensions for 2d list in python code example Example: 2d list comprehension python [[float(c) for c in row] for row in data]