Skip to content

Instantly share code, notes, and snippets.

@konchunas
Created February 15, 2019 16:37
Show Gist options
  • Save konchunas/495e9327b3fd76b21e84d6253373ae49 to your computer and use it in GitHub Desktop.
Save konchunas/495e9327b3fd76b21e84d6253373ae49 to your computer and use it in GitHub Desktop.
from typing import List
def has_even(numbers: List[int]) -> bool:
for num in numbers:
if num % 2 == 0:
return True
return False
def main() -> None:
vec = [1,9,2,5,4]
even_exists = has_even(vec)
print("Has even number", even_exists)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment