Splitting a list in python
        Posted  
        
            by mglmnc
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by mglmnc
        
        
        
        Published on 2010-03-24T03:59:49Z
        Indexed on 
            2010/03/24
            4:03 UTC
        
        
        Read the original article
        Hit count: 348
        
python
Hey im new to python. How do you get a portion of a list by the relative value of its sorting key.
example...
list = [11,12,13,14,15,16,1,2,3,4,5,6,7,8,9,10]
list.sort()
newList = list.split("all numbers that are over 13")
assert newList == [14,15,16]
        © Stack Overflow or respective owner