Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def L32(listA, categories):
- listC = [];
- for x in listA:
- x1 = x
- for y in categories:
- if x in y:
- if y == categories[0]:
- x1 = x1 + ":animal";
- if y == categories[1]:
- x1 = x1 + ":plant";
- if y == categories[2]:
- x1 = x1 + ":unit";
- if y == categories[3]:
- x1 = x1 + ":mammal";
- listC.append(x1);
- return (listC)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement