Created
August 24, 2018 01:02
-
-
Save koifish082/06f01cd5eaa7fc76ae9a7b8ecf6aa955 to your computer and use it in GitHub Desktop.
list_key_exist: It's like array_key_exists in php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ListUtil: | |
@staticmethod | |
def list_key_exist(sample_list, index): | |
if len(sample_list) > index: | |
print(sample_list[index]) | |
return | |
print("-1") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment