I'll start by saying please bear with me, I am very new to python and I need some help takeing a string with mixed letters and numbers and converting it to a INT. For example
stringname = '105 mV'
I would like '105 'striped from the string. of course if you cast like:
intname = int(stringname)
you get an error (ValueError: invalid literal for int() with base 10: '105 mV')
So my question is, is there a method that will do this for me. Currently I do this:
intname = int(stringname.replace(' mV',''))
and is seems to work but somehow seems a little clumsy.
Also if anyone knows of a good resource for sting methods I would very much appreciate you sharing with me.