Nested for loops and print statements

Cai Gengyang gengyangcai at gmail.com
Mon Sep 26 18:13:25 EDT 2016


Sure, I just sent in a subscription request to it ... but I'll still be asking for help here. Please help out a newbie. When I master this language I can help other new users too (This is good for the world and for everyone involved). Ideally, Information and education should be free and not locked up by a few academics and institutions. 

On Tuesday, September 27, 2016 at 6:00:40 AM UTC+8, bream... at gmail.com wrote:
> On Monday, September 26, 2016 at 9:57:52 PM UTC+1, Cai Gengyang wrote:
> > Ok it works now:
> > 
> > >>>for row in range(10):
> >       for column in range(10):
> >        print("*",end="")
> > 
> >      
> > ****************************************************************************************************
> > 
> > but how is it different from ---
> > 
> > >>> for row in range(10): 
> >        for column in range(10): 
> >           print("*",end="") 
> >            
> > SyntaxError: inconsistent use of tabs and spaces in indentation 
> > 
> > Why does the example on top work and the example below doesn't work ? The only difference is that the "print" statement is one space different from each other. Forgive me if i can't explain things clearly over the forum 
> > 
> 
> Perhaps you'd be more comfortable on the tutor mailing list https://mail.python.org/mailman/listinfo/tutor
> 
> Kindest regards.
> 
> Mark Lawrence.



More information about the Python-list mailing list