From f976e6cfa444caae6ec9f1a008f54af22dc88ff3 Mon Sep 17 00:00:00 2001 From: Tarun Aggarwal <48708852+Tarunagg1@users.noreply.github.com> Date: Sat, 3 Oct 2020 20:51:08 +0530 Subject: [PATCH] Create python_programe pryhon --- python_programe | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 python_programe diff --git a/python_programe b/python_programe new file mode 100644 index 0000000..5cd8f09 --- /dev/null +++ b/python_programe @@ -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.")