"Neo Vector" <neo_vec...@yahoo.com> wrote
Could you explain me how does it work, pls?
==============================
r = ''

r is an empty string

for c in 'abcd':

c takes the value of each letter in turn

           r = c + r

strings can be added such that the result is the concatenation of the two strings. So in this case:
r becomes the sum of its old value and the current value of c

repeat for the next value of c.

If that doesn't help then tell us which bit(s) of it you don't understand.

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to