Hello,

My code is -

l = len(m)
item = str(m[1])
for i in range(2,l):
    item = item + "-" + str(m[i])

This code is part of a bigger function. It works fine. But I am not happy
with the way I have written it. I think there is a better (Pythonic) way to
rewrite it.
If anyone knows how to improve this snippet, I would be very thankful.

Thanks and Regards,
Sumod


-- 
http://spawgi.wordpress.com
We can do it and do it better.
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to