for loop

shiva upreti katewinslet626 at gmail.com
Sun Sep 20 10:39:17 CEST 2015


On Sunday, September 20, 2015 at 1:33:57 PM UTC+5:30, Chris Warrick wrote:
> On 20 September 2015 at 09:55, shiva upreti <katewinslet626 at gmail.com> wrote:
> > https://ideone.com/BPflPk
> >
> > Please tell me why 'print s' statement is being executed inside loop, though I put it outside.
> > Please help. I am new to python.
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> 
> You have mixed indentation. Your code contains both tabs and spaces.
> Python interprets tabs as 8 spaces, while your other indentation is 4
> spaces, leading to bad parsing.
> 
> Please make sure you use only spaces (reconfigure your editor to
> always insert 4 spaces and reindent everything with tabs)
> 
> -- 
> Chris Warrick <https://chriswarrick.com/>
> PGP: 5EAAEA16

Thanks. It works fine now.:)


More information about the Python-list mailing list