Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Python 3 与 Python 2.6 中,我注意到我可以将两个整数相除并得到一个浮点数。如何恢复 Python 2.6 的行为?
是否有不同的方法来获取 int/int = int?
尝试这个:
a = 1 b = 2 int_div = a // b