a.append([1, 2]) print(a)
NameError Traceback (most recent call last) in () ----> 1 a.append([1, 2]) 2 print(a)
NameError: name 'a' is not defined <<<<<<<<<<<<<<<<<<<<<<<<<<<
a.append([1, 2]) print(a)
NameError Traceback (most recent call last) in () ----> 1 a.append([1, 2]) 2 print(a)
NameError: name 'a' is not defined <<<<<<<<<<<<<<<<<<<<<<<<<<<
I suspect this to be part of python code!
to get this working try this:
The code:
a = []
a.append([1,2])
print(a)
The output will be [[1,2]]
and print(a[0])
will output: [1,2]