Artificial intelligent assistant

二次元配列の要素を取り出したい A = [['apple', 1],['banana', 2],['orange', 3],['grape', 4]] A B = [ x for x in A] print(B) >>>[['apple', 1], ['banana', 2], ['orange', 3], ['grape', 4]] B = [ x[0] for x in A] print(B) >>>['apple', 'banana', 'orange', 'grape'] >>>['apple', 1] while['banana', 2]['orange', 3]['grape', 4] B = A[0]for

for


In [1]: A = [['apple', 1],['banana', 2],['orange', 3],['grape', 4]]

In [2]: for x in A:
...: print(x)
...:
['apple', 1]
['banana', 2]
['orange', 3]
['grape', 4]

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 700fa266898e53be4f238a4a4b3a5b52