From b5a3890c93dbf3c34742594f213ff6797de172f4 Mon Sep 17 00:00:00 2001 From: s45148 Date: Sun, 3 Dec 2017 15:18:22 +0100 Subject: [PATCH] labs04 z1 --- labs04/task01.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/labs04/task01.py b/labs04/task01.py index 88741a4..2144193 100644 --- a/labs04/task01.py +++ b/labs04/task01.py @@ -1,3 +1,13 @@ #!/usr/bin/env python2 # -*- coding: utf-8 -*- +#e +def is_numeric(InputList): + OutputLits = [] + for i in range(len(InputList)): + t = InputList[i] + OutputLits.append(isinstance(t,(int, float))) + #print(isinstance(x,(int, float))) + return OutputLits +x = is_numeric([1,2.3,'safd',2.2,[1,2]]) +print(x) \ No newline at end of file