title: How to code this condition in Python? I am new to python
body: <p>I am new to python. so any help will be appreciated.
  I have two arrays  <code>A = [1,2,4,2,3,5,3]</code> and <code>B = [0,4,4,4,1,1,1]</code>
  for the function if I give A, B as input then I should get output as = <code>[1,(2+4+2),(3+5+3)] = [1,8,11]</code>(if numbers are repeating in B then corresponding  values in A should be added together).</p>