[Python] find values in a shuffled list of sublists by one of the values [closed]

Discussão em 'Python' iniciado por Stack, Março 15, 2025.

  1. Stack

    Stack Membro Participativo

    I have a list if lists

    items = [
    ["e",None,None],
    ["pork","pork.png","meat"],
    ["beef","b.png","meat"],
    ["cheese","c.png","not"],
    ]
    items_list = ["e","beef","pork","beef"]
    shuffle(items_list)


    how can I print the second or third value in sublists without their index?

    for i in items_list:
    print ???

    Continue reading...

Compartilhe esta Página