Skip to content

Instantly share code, notes, and snippets.

@umarhussain88
Created November 9, 2021 12:23
Show Gist options
  • Save umarhussain88/c2e36913e6ebccdb5e4ed382e8460cb5 to your computer and use it in GitHub Desktop.
Save umarhussain88/c2e36913e6ebccdb5e4ed382e8460cb5 to your computer and use it in GitHub Desktop.
python kata challenge.
import numpy as np
NaN = np.nan
def is_nums(numbers : tuple) -> bool:
return all((isinstance(num, (int,float)) for num in numbers))
#is_nums(1, 4, 3, 2, 5)
#True
#is_nums(1, "a", 3)
#False
#is_nums(1, 3, NaN)
#True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment