Home > other >  Difference between two multiple arrays by the index in PYTHON
Difference between two multiple arrays by the index in PYTHON

Time:04-06

Hi guys i just start to programming and im trying to get this right.

A = [['1','Jack','33'], ['2','Maria','23'], ['3','Christian','9'] ] 
B = [['1','Jack','33'], ['2','Maria','23'], ['3','Christian','9'], ['4','Denis','45'] ]

I want to check the array B[0] and print out just "4 Denis 45"

CodePudding user response:

I'm unsure what of you want. Is this it:

for lst in B:
    if lst not in A:
        print(" ".join(lst))

Output:

4 Denis 45
  • Related