Skip to content

Instantly share code, notes, and snippets.

@tayyebi
Created March 9, 2019 12:12
Show Gist options
  • Save tayyebi/ed7f1fcdaf6453ced517cac24a6ba551 to your computer and use it in GitHub Desktop.
Save tayyebi/ed7f1fcdaf6453ced517cac24a6ba551 to your computer and use it in GitHub Desktop.
busy loop in python using lambda
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