In Python 3 vs Python 2.6, I've noticed that I can divide two integers and get a float. How do you get the Python 2.6 behaviour back?
Is there a different method to get int/int = int?
Try this:
a = 1
b = 2
int_div = a // b
// is available in Python2 as well (since 2.2, I believe).1.0 // 2 and 1 // 2.0 maybe surprisingly return a float with value 0.0.
//(floor division) instead of/(true division).//floor division operator.