I want to get all the integers which are between two float values.
Example:
I have an interval (2.4 , 5.6)
. As an output I want to have (3, 4, 5)
.
Is there any function that does this?
Try this:
import math
list(range(math.ceil(num1), math.floor(num2) + 1))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With