Reputation: 960
I have result returned as from ZrangebyScore function as [b'101']
. I would like to extract only 101
value and discard other additional characters. It is in byte form. How to convert it in Integer format using Python.
Upvotes: 0
Views: 548
Reputation: 438
If you are using Py3 try this:
mylist = [b'101']
val = int(mylist[0].decode())
Upvotes: 3