Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #69940 > unrolled thread
| Started by | length power <elearn2014@gmail.com> |
|---|---|
| First post | 2014-04-09 16:57 +0800 |
| Last post | 2014-04-09 16:57 +0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
how to insert the elements in a list properly? length power <elearn2014@gmail.com> - 2014-04-09 16:57 +0800
| From | length power <elearn2014@gmail.com> |
|---|---|
| Date | 2014-04-09 16:57 +0800 |
| Subject | how to insert the elements in a list properly? |
| Message-ID | <mailman.9065.1397039127.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
word=["x1","x2","x3","x4","x5"] w=word[-2:] del word[-2:] word.insert(2,w) word ['x1', 'x2', ['x4', 'x5'], 'x3'] what i want to get is ['x1', 'x2', 'x4', 'x5', 'x3'] how can i insert them ?
Back to top | Article view | comp.lang.python
csiph-web