def is_int(x): try: int(x) except ValueError: return False else: return True