Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #This Python function checks String -typed (for I.E. User's Input through input-function found @ Python Standard Library)
- #if string is int -expression typed representing numbers in the range -2147483648 through 2147483647.
- #Input parameter type String
- #Return type Boolean
- #Usage example:
- #str = "";
- #while (check(str) == False):
- # str = input("Please enter Integer value:");
- #
- #print(int(str));
- #This function is alternative for using exception handling reserved keywords 'try' and 'except';
- def check(str):
- if (len(str) >0) and isinstance(str(mjono),int):
- return True;
- return False;
Advertisement
Add Comment
Please, Sign In to add comment