Created
November 9, 2021 12:23
-
-
Save umarhussain88/c2e36913e6ebccdb5e4ed382e8460cb5 to your computer and use it in GitHub Desktop.
python kata challenge.
This file contains hidden or 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
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