Hello Everyone,
I am scanning a barcode from scanner and the data I receive is a string type, Now I see the data being populated but It has a space in front of data. So first character is space and then actual characters. “1Z096V4Y0657697557” Is there a way I can get rid of those extra characters? Interestingly I see boxes here but in actual tag it’s a space.
I tried it but I think I might be doing it in a wrong manner as I don’t know python much. Let’s say I have
" Hello" in tag 9. What do I write? strip(tag9) or tag9.strip() ? and the result after strip will be stored in same tag9 ?
I tried the same way. I think I know why it isn’t working. It shows me space in data value but when I copy that tag in notepad or here it looks like - “1Z096V4Y0657697557”.even this website is removing those characters. I am not sure if I can upload a picture here. As you see it’s not a space, It’s a character which is not readable by tag and it’s showing space.
Is there a command to delete first and last character from received string?
Somewhat safer would be to print repr(tag1) (to see the explicit character code(s) used as the prefix and suffix) and then pass them to strip, as in tag2.strip("\x01")