Python making sure x is an int, and not a pesky float
- by Aperture
For example:
import random
x = random.randint(1, 6)
y = 2
new = x / y
...
now, lets say x turns out to be 5.
How can I catch if it's an int or a float before doing other things in my program?