Python 3 syntax error on raspbian but not on mac -
i thought python 3 code inter-operable, function raises syntax error on second line when run on raspbian / debian, not on mac.
def cleanstr(s): toremove = dict.fromkeys((ord(c) c in u'\xa0\n ')) return s.translate(toremove)
i'm confounded, function worked cleaning strings.
can suggest why not running ? difference of unicode syntax or differences in escaping?
Comments
Post a Comment