python - Check if item is in an array -


if i've got array of strings, can check see if string in array without doing for loop? specifically, i'm looking way within if statement, this:

if [check item in array]: 

assuming mean "list" "array", can do

if item in my_list:     # whatever 

Comments

Popular posts from this blog

Glib GIOChannel -

delphi - When I encode/decode SMS PDU (GSM 7 Bit) user data, do I need prepend the UDH first? -

python - Obscure curses error message when creating a sub window -