Generally there is a parallel between Java and Python in how strings are converted to numbers
int x = Integer.parseInt(a, 2); //java
x = int(a,2) # python
But it does not seem to work for short
short x = Short.parseShort(a, 2); //java
x = short(a,2) # does not work in python
Does anyone know how to get short to work?
There is no short data type in Python. Just use int.
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