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 -

jsp - java.sql.SQLException: [Microsoft][ODBC Microsoft Access > Driver] Too few parameters. Expected 1 -

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