Multiple Condition If Fonction Inside A For Loop
i'm browsing SO and i can't find a solution to my problem, so i made a post.
I try to make a For loop with a If statement inside that have multiple conditions (at least 3) but it does not work and i can't wrap my head around it... i tried lot of things but nothing seams to work.
here is my code, simplified because in my actual code the values for a, b, c and d are random :
a= b= c= d=[0,1,2,3,4,5,6,7,8] for i in d: if d>a and\ d>b and\ d>c: print("OK") else: print("not OK")
But no matter what i try, i always get this output :
not OK not OK not OK not OK not OK not OK not OK not OK not OK
Thank you for your help
Do you mean this :
a = 1 b = 2 c = 3 d = [0, 1, 2, 3, 4, 5, 6, 7, 8] for i in d: if i > a and i > b and i > c: print("OK") else: print("not OK")
not OK not OK not OK not OK OK OK OK OK OK
- → What are the pluses/minuses of different ways to configure GPIOs on the Beaglebone Black?
- → Django, code inside <script> tag doesn't work in a template
- → React - Django webpack config with dynamic 'output'
- → GAE Python app - Does URL matter for SEO?
- → Put a Rendered Django Template in Json along with some other items
- → session disappears when request is sent from fetch
- → Python Shopify API output formatted datetime string in django template
- → Shopify app: adding a new shipping address via webhook
- → Shopify + Python library: how to create new shipping address
- → shopify python api: how do add new assets to published theme?
- → Access 'HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT' with Python Shopify Module