a one line thing - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Forum & Off Topic (https://python-forum.io/forum-23.html) +--- Forum: Bar (https://python-forum.io/forum-27.html) +--- Thread: a one line thing (/thread-8171.html) |
a one line thing - Skaperen - Feb-08-2018 for fun, a challenge (but don't spill any beer): define 2 functions, a() and b() where a() calls b() and b() prints out "hello world", and call a(). not very challenging? do it in the python command line -c option. * Skaperen predicts wavic will be the winner RE: a one line thing - DeaD_EyE - Feb-08-2018 python3 -c "a = lambda: b(); b = lambda: (print('Hello World'), a()); a()" New Task: Do a similar thing without hitting the recursion limit. RE: a one line thing - Skaperen - Feb-09-2018 i get that recursion, too. why use lambda instead of def? |