Re: [Tutor] Explanation of this print statement

2015-02-08 Thread Dave Angel
On 02/08/2015 06:01 PM, Shawn Byers wrote: Hello I was wondering if someone could explain this print statement for r in range(6,0,-1): print((6-r)*''+r*'o') You probably intended to have a blank between the first two single-quotes. for r in range(6,0,-1): print((6-r)*'

Re: [Tutor] Explanation of this print statement

2015-02-08 Thread Mark Lawrence
On 09/02/2015 00:19, Alan Gauld wrote: On 08/02/15 23:01, Shawn Byers wrote: Hello I was wondering if someone could explain this print statement for r in range(6,0,-1): print((6-r)*''+r*'o') Have you tried running it? Do you see what it is doing? Try evaluating range(6,0,-1) at the

Re: [Tutor] Explanation of this print statement

2015-02-08 Thread Alan Gauld
On 08/02/15 23:01, Shawn Byers wrote: Hello I was wondering if someone could explain this print statement for r in range(6,0,-1): print((6-r)*''+r*'o') Have you tried running it? Do you see what it is doing? Try evaluating range(6,0,-1) at the interpreter (you may want to convert i

[Tutor] Explanation of this print statement

2015-02-08 Thread Shawn Byers
Hello I was wondering if someone could explain this print statement for r in range(6,0,-1): print((6-r)*''+r*'o') ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tut