Re: [Tutor] indexing elements

2007-09-04 Thread Alan Gauld
chinni [EMAIL PROTECTED] wrote i had some doubt about this line can any body clarify this plz... endings = ['st', 'nd', 'rd'] + 17 * ['th'] + ['st', 'nd', 'rd'] + 7 * ['th'] + ['st'] Using the interpreter: endings = ['st', 'nd', 'rd'] + 17 * ['th'] + ['st', 'nd', 'rd'] + 7 *

[Tutor] indexing elements

2007-09-03 Thread chinni
Hi all, i had some doubt about this line can any body clarify this plz... endings = ['st', 'nd', 'rd'] + 17 * ['th'] + ['st', 'nd', 'rd'] + 7 * ['th'] + ['st'] -- Best Regards, M.Srikanth Kumar, Jr.Software Developer, Google India Pvt Ltd.., HYDERABAD. Phone no: +91-9866774007

Re: [Tutor] indexing elements

2007-09-03 Thread Kent Johnson
chinni wrote: Hi all, i had some doubt about this line can any body clarify this plz... endings = ['st', 'nd', 'rd'] + 17 * ['th'] + ['st', 'nd', 'rd'] + 7 * ['th'] + ['st'] You can try it in the interactive interpreter: In [8]: endings = ['st', 'nd', 'rd'] + 17 * ['th'] + ['st',

Re: [Tutor] indexing elements

2007-09-03 Thread Ian Witham
Hi, I'm not too sure what your asking here, your code assigns the following to endings: ['st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'st'] This is what we