Apr-21-2019, 04:50 AM
(This post was last modified: Apr-21-2019, 04:51 AM by Gribouillis.)
spam.insert(i, 'and')
inserts at index min(len(spam), i)
when i
is non negative and at index max(0, len(spam) + i)
when i
is negative.
Automate the boring stuff, inserting commas in list
|
Apr-21-2019, 04:50 AM
(This post was last modified: Apr-21-2019, 04:51 AM by Gribouillis.)
spam.insert(i, 'and') inserts at index min(len(spam), i) when i is non negative and at index max(0, len(spam) + i) when i is negative.
|
|
Messages In This Thread |
Automate the boring stuff, inserting commas in list - by DJ_Qu - Apr-21-2019, 04:17 AM
RE: Automate the boring stuff, inserting commas in list - by Gribouillis - Apr-21-2019, 04:50 AM
RE: Automate the boring stuff, inserting commas in list - by DJ_Qu - Apr-21-2019, 07:42 AM
RE: Automate the boring stuff, inserting commas in list - by perfringo - Apr-21-2019, 03:52 PM
|