I am trying to import data from my arduino to python so that I can then use it in my program but I cannot find how to send the data without importing b'\r\n' as well.
This is an example of what I am currently importing:
Your Arduino is probably sending the data with b'\r\n' in it.
You can get the numbers out with this regular expression like this:
>>> import re >>> re.findall('[0-9]+', "b'197,2302,50,198,\r\n'") ['197', '2302', '50', '198']