[Python] python any() function: the basics [duplicate]

Discussão em 'Python' iniciado por Stack, Fevereiro 26, 2025.

  1. Stack

    Stack Membro Participativo

    There are other questions similar to this one on StackOverflow, but none are as simple / approach it from this specific succinct angle.

    I have a list as such

    my_lst = ["apple", "orange", "banana"]

    and a variable as such

    my_var = "apple"

    so I use any()

    my_var == any(my_lst)

    which produces

    False

    What am I missing?

    Continue reading...

Compartilhe esta Página