[Tutor] multiple function returns
Jim Mooney
cybervigilante at gmail.com
Fri Jun 28 18:06:35 CEST 2013
>>>> def foo(x):
> ... if x:
> ... return True
> ... return False
>
> I'll leave it to you to work out why that works. It's very handy!
>
Hey, it saves typing an "else" and as you know, I'm the Lazy Typist.
My program to make dicts, lists, etc from a single string, using no
special characters, has saved me so much little-finger typing already
I'd never part with it, flawed as it is. It's good-enough ;')
Jim
More information about the Tutor
mailing list