Created
March 9, 2019 12:12
-
-
Save tayyebi/ed7f1fcdaf6453ced517cac24a6ba551 to your computer and use it in GitHub Desktop.
busy loop in python using lambda
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = [True, True, True, False, True, True] | |
X = lambda n : a[n] if n < 1 else X(n-1) and a[n] | |
def explore (): | |
print ('hi') | |
while X(len(a) - 1): | |
continue | |
explore() | |
explore() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment