Python: PHP equivalent of in_array() for Python

To check if a value exists within a PHP array:

if (in_array("x", $php_array)) {
// Exists
}

To check if a value exists within a Python list:

if "x" in python_list:
# Exists
 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog