I want to print different things when input()
gets different data types. I have the following script:
#!/usr/bin/env python
#-*- coding:utf-8 -*-
f = input("Please enter a number: ")
if f == type(int):
print("That's good")
elif f == type(str):
print("That isn't a number.")
else:
print("BrainOverflow")
This script always returns the else part.