I have a question: Does python have a whole number data type> Unlike integers and floats, whole numbers are non-negative (0 to infinity). Does python have a data type declaration for that?
No, it doesn't have such a number as a native type. You could use int, and just never store a negative number. Or you could create your own type and limit its value in its methods.
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