How to implement function like this?

Loic Mahe loic.mahe at nospam.fr
Tue Oct 23 11:48:08 CEST 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