SyntaxFix
Write A Post
Hire A Developer
Questions
You can use try catch block here:
s="1234" try: num=int(s) print "S contains only digits" except: print "S doesn't contain digits ONLY"