Faced the problem of finding list items in another multiple list. There is a list with mac addresses:
mac = [mac1, mac2, mac3] Multiple list with MAC and IP:
device = [[mac1,ip1],[mac2,ip2],[mac3,ip3]] I'm trying to find which item from the mac list is missing from the device list. I tried to implement:
i = 0 for values in mac: while i <= len(device)-1: if values not in device[i][0]: print('No') i += 1 But this, in addition to what looks very unattractive, also checks only the first element of the mac list. Please tell me how to implement this correctly? I tried through the map but did not understand how to do it.