Skip to content

Instantly share code, notes, and snippets.

@BolajiOlajide
Created May 15, 2017 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BolajiOlajide/22c79dced510b5d69531b2ad0e89cfbc to your computer and use it in GitHub Desktop.
Save BolajiOlajide/22c79dced510b5d69531b2ad0e89cfbc to your computer and use it in GitHub Desktop.
Array Data Checker
sample_array = ['Bolaji','Damilola','Ichiato','Oladipupo','Koya','Mumeen']
# I want to cycle through the array an check if an element is there.
# Here i want to see if 'Bolaji' is in the sample_array
def name_exists(name):
for element in sample_array:
if element == name:
print("Bolaji Exists")
else:
print("The Name Doesn't exist)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment