java - How I solve this IndexError? -


My problem is that I need to convert this Java code into Python:

  Public stable byte x1 = 0, x2 = 0, x3 = 0, x4 = 0, x5 = 0, x6 = 0;   

The dragon is in the Java code

Jaman told me that I can only put it in this line: <<> <<> x = [0] * 6

But now when I run the code I see it:

  Traceback (make the most recent last call): File "test.py", line 62,   

I have already seen other posts but I do not get it yet. It is part of the code:

  # - * - coding: UTF-8 - * - Import serial data OSEM = Baitier (5) print (datosom) detosom [0] = 65 print (detosom) X = [0] * 6 k = 0; Trama = 1; B = 0; C = 0; Conexion = True; Resp = 0 if (conexion): # {print ('conexion ON'), while (resp & lt; 200): print ('save data') while (c == 0): # {print ('what is c ? ') X [0] = datosOEM [k]; If (x [0] == 1): # {Print ('What's x [0]?') X [1] = Detos OEM [K + 1]; If ((x [1] and 1) == 1): # {print ('what is x [1]?') C = 1; #} #} Kashmir = K + 1; #} K = k-1; ...   

To be clear, my question is: How can I create some bitereseries in the python that are not out of bounds?

I appreciate every support that you can give me with this.

Please, do not be hard with me. I am just learning

To solve this problem, I changed a bit if I changed

  if (x [0] == 1): if ((x [1] & amp; 1) == 1):     
  if (x [0] == 0): if ((x [1] & amp; 1 ) == 0):   

And in this way I can fix the problem

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -