I would like to pass in 3 conditions to the function "check" to apply to str1, in this case the output should be [False, False, True]:
def check(conditions):
str1 = '/'
print(conditions)
check(conditions=[str1.find('//www.fao.org')!=-1, str1.find('//fao.org')!=-1, str1[0]=='/'])
However, before even calling the function it runs an error:
NameError: name 'str1' is not defined
Because this means that the conditions are executed even before the function check can be executed, how can I pass these conditions as arguments?