Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions python_programe
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from collections import Counter
def checkInFirst(a, b):
count_a = Counter(a)
count_b = Counter(b)

for key in count_b:
if key not in count_a:
return False
if count_b[key] > count_b[key]:
return False
return True

a = [1,5,6,4,1,2,3,5]
#a1 = [1,5,6,5,1,2,3,6]
b = [1,1,5]

res = checkInFirst(a, b)

if res==True :
print ("It's a match.")
else :
print ("It's Gone.")