skip to main | skip to sidebar

Ciantic's testing blog

It is very likely that I will not post here.

Thursday, March 26, 2009

Python notes, halving list

Splitting list from the middle:
>>> a = [34,412,3,2,4,6,78,9,2]
>>> [a.pop(0) for alk in a]
[34, 412, 3, 2, 4]
... tricky ain't it.
Posted by Ciantic at 10:59 AM
Labels: python

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2018 (1)
    • ►  Jun (1)
  • ►  2015 (2)
    • ►  Nov (1)
    • ►  Oct (1)
  • ►  2012 (3)
    • ►  Oct (1)
    • ►  Jun (1)
    • ►  Jan (1)
  • ►  2011 (5)
    • ►  Oct (1)
    • ►  Sep (2)
    • ►  Jul (1)
    • ►  Jan (1)
  • ►  2010 (8)
    • ►  Dec (1)
    • ►  Oct (1)
    • ►  Jun (1)
    • ►  May (1)
    • ►  Feb (2)
    • ►  Jan (2)
  • ▼  2009 (9)
    • ►  Oct (3)
    • ►  Jun (1)
    • ▼  Mar (2)
      • Eclipse, pydev notes, refresh errors and warnings
      • Python notes, halving list
    • ►  Feb (2)
    • ►  Jan (1)
  • ►  2008 (4)
    • ►  Aug (2)
    • ►  Jul (2)

About Me

Ciantic
View my complete profile