2

I'm trying to port a Python 3.5 project from PC to Android QPython3 but for the line:-

if ch = in u'\x00\xe0':
    ch = getwch()

I'm getting this when I run it:-

if ch = in u'\x00\xe0':
                ^
  SyntaxError: invalid syntax

I thought QPython3 was supposed to run all 3.x scripts and the Unicode 'u' prefix isn't a new addition so what can the problem be? Are hex numbers in strings treated differently?

Avión
  • 7,963
  • 11
  • 64
  • 105
JimFitz
  • 51
  • 3

1 Answers1

2

To answer my own question, after much fiddling about I got it to work using:-

if ch in bytes([0x00, 0xe0]):

instead.

JimFitz
  • 51
  • 3