summaryrefslogtreecommitdiff
path: root/progs/a476.py
blob: 7c1b0b6b8d88204a32821f9d04057cbcaeda88c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
def check_integer(text):
 text = text.strip()
 if len(text) < 1:
    return None
 else:
     if all(text[i] in "0123456789" for i in range(len(text))):
          return True
     elif (text[0] in "+-") and \
         all(text[i] in "0123456789" for i in range(1,len(text))):
         return True
     else:
        return False