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)*' '+r*'o')


Perhaps it'd be more interesting to put some other character in the quotes:

 for r in range(6,0,-1):
           print( (6-r)*'X' + r*'o' )

--
DaveA
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to