Last active
April 9, 2018 13:53
-
-
Save AutomateAaron/a28f703f8cd5868d8000182c016807cd to your computer and use it in GitHub Desktop.
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
list_a = [1, 2, 3] | |
list_b = ['hello', 'world'] | |
conditionA = True | |
conditionB = True | |
def inner_loop(func): | |
for j in list_b: | |
func(j) | |
#do sth in list_b | |
if (conditionA): | |
for i in list_a: | |
# do sth in list_a | |
print('i: {}'.format(i)) | |
inner_loop(lambda s: print('A: {}'.format(s))) | |
print('\n') | |
if (conditionB): | |
inner_loop(lambda s: print('B: {}'.format(s))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment