python - Terminal gives indentation error, editor does not -


here code:

   count = 0    = 0    while count < len(newlist):      if newlist[i] == newlist[i+6] , newlist [i+6] != newlist [i+12]:           two1.append(newlist[i])         two1.append(newlist[i+1])         two1.append(newlist[i+2])         two1.append(newlist[i+3])       count=count+1        i=i+6    print two1 

in terminal, get:

  file "<stdin>", line 2     count=count+1; i=i+6     ^ indentationerror: unexpected indent 

in learnpython.org editor, no error. either way, two1 printing [], not want.

your first line of code indented, illegal, terminal correct. sure haven't forgotten paste line source code?

there program logic missing - newlist , two1 aren't defined anywhere, instance.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -