I have posted data coming from a webform, and I am trying to convert lb's to oz's for shipping labels.
The webform is set to just post numbers.
<input type="number" step="1" name="lbs" id="lbs" class="form-control input-lg" placeholder="Lb's" tabindex="7">
Below is the python code
llb = request.form['lbs']
lw = (llb*16)
return lw
It always returns the wrong number.
2 for llb returns 2222222222222222 when it should be 32. I tried messing with 0o16 etc with no success.
I even tried making sure llb was an int with
llb = int(request.form['lbs'])
I can't figure this out for the life of me. For all I know I could be over thinking this.
I even tried everything mentioned on Wrong math with Python? and a few others I could find simlar.