It is allowed the use of a comprehension list on a "list of lists"? I would like to extract a list from a nested list. I did try this:
def main():
a = ['1','2','3']
b = ['4','5','6']
c = ['7','8','9']
board = [a,b,c]
y = [x for x in board[1][i] if i in range(0,3)]
print y
but I get "NameError: name 'i' is not defined". I'm using the wrong syntax or nested list cannot be used like this?
Thanks a lot!