Mercurial > hg > config
view python/example/anonomouse.py @ 859:b8510769d001
py3 compat
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Wed, 11 Apr 2018 12:28:37 -0700 |
parents | 9f42400dcd83 |
children |
line wrap: on
line source
def foo(a): c = ['hi'] def bar(n): d = c[:][0].upper() return '{} {}!'.format(d, a) * n fleem = lambda n: '{} {}!'.format(c[:][0].upper(), a) * n c = ['hello'] return (bar, fleem) _bar, _fleem = foo("world") print (_bar(2)) print (_fleem(2))