запустить перерыв после process.exit ()

Вы можете использовать str.isdigit и str.isalpha:

if a.isalpha():
   #do something
elif a.isdigit():
   #do something

help на str.isdigit:

>>> print str.isdigit.__doc__
S.isdigit() -> bool

Return True if all characters in S are digits
and there is at least one character in S, False otherwise.

help на str.isalpha:

>>> print str.isalpha.__doc__
S.isalpha() -> bool

Return True if all characters in S are alphabetic
and there is at least one character in S, False otherwise.
0
задан ja0k0010 17 January 2019 в 05:19
поделиться