Ok i got it. thanks all

2009/3/24 Padmanaban Ganesan <padhu...@gmail.com>

> Really a splendid code snippet.
>
> Could any one explain me whats this in it .... abs(i)....???
>
>  2009/3/24 Alan Gauld <alan.ga...@btinternet.com>
>
>> "Daniele" <d.co...@gmail.com> wrote
>>
>>> for i in range(-10,11):
>>>   print '*'*(11-abs(i))
>>>
>>
>> Apologies, this is actually more powerful than my solution which only
>> addressed the immediate concern of  printing decreasing lines. This of
>> course covers both sides of the triangle.
>> It was only when I thought that it should be possible to do both in one
>> loop that I came up with the same solution! :-)
>>
>> The question for Jared is do you understand how it works?
>> That is probably more important than getting it to work!
>>
>> Alan G
>>
>> _______________________________________________
>> Tutor maillist  -  Tutor@python.org
>> http://mail.python.org/mailman/listinfo/tutor
>>
>
>
>
> --
> Ta,
> Paddy
> "The Secret to creativity is knowing how to hide your sources "
>



-- 
Ta,
Paddy
"The Secret to creativity is knowing how to hide your sources "
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to