loops - Python2.7 looping through custom sequence -


Rookie Question Season Continues :)

I have found a function that is numerical

Example (which works):

 [0, 1, 2, 3, 7, 8, 15, 31, 32] Code> To: RowTDE (i)   

Question

I would like to avoid typing in all required values, I would like to use something:

  for i [: 2] + [7:10]] [15:]: rotate (i)   

I have tried and tried to do it:

Syntax error: invalid syntax

Do I need to first make a list of integers to use it? Like

  intList = [1, 2, 3, 4, ... 33]. Besides, as each data source is mentioned before, this limit will be different, but the maximum numeric value is 40 (each column represents one column index) less. Will be done.  

As usual, I highly appreciate your help with this and tell me that you need more information.

Happy Monday morning :)

You can enter category S:

  gt; & Gt; & Gt; For category (3) + Category (7, 9) + Category (15, 16) + Category (31, 33): Print I 0 1 2 7 8 15 31 32   

Or Category Build piece it:

  & gt; & Gt; & Gt; R = boundary (33)> gt; & Gt; & Gt; I [R: 3] + R [7: 9] + R [15:16] + R [31:]: Print I. 1 2 7 8 15 31 32   

But you can not slice anything, so [: 2] is itself a SyntaxError .

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -