Advertisement
Dmitry_Dronov

sorted

Nov 30th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. listA = IN[0]
  2. listB = IN[1]
  3. Outlist = list()
  4.  
  5. for i in range(len(listB)):
  6.     for j in range(len(listA)):
  7.         if listB[i] == listA[j]:
  8.             if listA.count(listB[i])==1:
  9.                 Outlist.append(j)
  10.                 break
  11.             else:
  12.                 Outlist.append(j)
  13.         else:
  14.             continue
  15.              
  16. OUT = Outlist
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement