Hacker News new | past | comments | ask | show | jobs | submit login

Also definitely learn about using sum on non-numbers, and the key argument to min and max. They can be incredibly handy, but I hardly see them used. Have a contrived example:

    >>> max(['aaa', 'bb', 'c'], key=lambda item: len(item))
    'aaa'



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: