How to implement function like this?

Loic Mahe loic.mahe at nospam.fr
Tue Oct 23 05:48:08 EDT 2007


even shorter:

def funcA(tarray):
     s = min(len(tarray), 3)
     return [2, 3, 4][0:s] + [e for e in funcB(3-s)[0:3-s]]



More information about the Python-list mailing list