Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. def L32(listA, categories):
  2. listC = [];
  3. for x in listA:
  4. x1 = x
  5. for y in categories:
  6. if x in y:
  7. if y == categories[0]:
  8. x1 = x1 + ":animal";
  9. if y == categories[1]:
  10. x1 = x1 + ":plant";
  11. if y == categories[2]:
  12. x1 = x1 + ":unit";
  13. if y == categories[3]:
  14. x1 = x1 + ":mammal";
  15. listC.append(x1);
  16. return (listC)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement