1
0
forked from tdwojak/Python2017
Python2017/labs04/task01.py
2017-12-14 12:28:39 +01:00

22 lines
362 B
Python

#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import math
def is_numeric(lista):
bool = False
for i in lista:
bool = isinstance(i, int) or isinstance(i, float)
if not bool:
return False
return bool
print(is_numeric([-1,2.1,3]))
print(is_numeric([-1,2.1, '3',3]))
print(is_numeric(['2']))
print(is_numeric([None]))