Python: PHP equivalent of in_array() for Python

0 Comments

To check if a value exists within a PHP array:

1.if (in_array("x", $php_array)) {
2.  // Exists
3.}

To check if a value exists within a Python list:

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