Hello,
I'm working my way through some code examples and I stumbled upon this:
endings = ['st', 'nd', 'rd'] + 17 * ['th'] + ['st', 'nd', 'rd'] + 7 * ['th']
+ ['st']
I understand that for numbers after 4 and until 20 they end in 'th' and I can see that we are adding 17 more items to the list, and I understand that '17 * ['th'] is adding 'th' to the list 17 times, however, I don't understand how this works.
Can you shed some light on this?