human
Program to check if input is an integer or a string | This function Returns true if s is a number else false.
Driver code.
Store the input in a str variable.
Function returns 1 if all elements are in range '0 ▁ - ▁ 9'.
Function returns 0 if the input is not an integer"
How can the above be solved in Python?
assistant
#Here is code to program to check if input is an integer or a string and the other steps required.
 def isNumber ( s ) :
	for i in range ( len ( s ) ) :
		if s [ i ] . isdigit ( ) != True :
			return False
	return True
if __name__ == " _ _ main _ _ " :
	str = "6790"
	if isNumber ( str ) :
		print ( " Integer " )
	else :
		print ( " String " )