randomling: Sherlock (of BBC Sherlock) in a bathrobe, grinning. (sherlock)
[personal profile] randomling


a = [ 1, 2, 3, 4, 5, 10]
b = [ 7, 8, 9, 10]

def in_list(a,b):
    for item in a:
        if item in b:
            return True
    return False

if in_list(a,b):
    print "Yay"



Profile

randomling: A wombat. (Default)
Lee

January 2024

S M T W T F S
  12 34 56
78 9 10111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Nov. 3rd, 2025 12:41 pm
Powered by Dreamwidth Studios