What use for reversed()?

fl rxjwg98 at gmail.com
Sun May 31 23:11:33 EDT 2015


On Sunday, May 31, 2015 at 4:23:19 PM UTC-7, Tim Delaney wrote:
> On 1 June 2015 at 05:40, fl <rxj... at gmail.com> wrote:
> Hi,
> 
> The for statement must have a colon at the end of line e.g. a complete for statement and block is:
> 
> for br in b:
>     print br
> 
> This will output the characters one per line (on Python 3.x), since that is what the reversed() iterator will return. You will need to do something else to get it back to a single string.
> 
> 
> Have you read through the python tutorials?
> 
> https://docs.python.org/3/tutorial/
> 
> 
> or for Python 2.x:
> 
> https://docs.python.org/2/tutorial/
> 
> Tim Delaney 

Thank all of you. This is the third time I learn Python. Even though I had
learnt two times, I haven't grasp it. I hope that I can gain a big jump now.
I had read the help tutorial, but forgot it since the long time. But your
reminding does make me remember these stuff.



More information about the Python-list mailing list