Does anybody have a quickie for converting an unsafe string to an int?
int
The string typically comes back as: \'234\\r\\n\' or something like
\'234\\r\\n\'
def str_to_int(a): str_to_int_output="" for i in range(len(a)): for b in range(10): if a[i]==str(b): str_to_int_output+=a[i] return int(str_to_int_output)
fn for "str to float" is a bit more comlicated, but i think i can do it if it is needed.