Answer to Question #303463 in Python for ani

Question #303463

arjun has two strings s and t he can do following operation at most once

1
Expert's answer
2022-02-28T01:06:23-0500
def excludeitem(item1, item2):
    new_item = []
    max = item1 if len(item1) > len(item2) else item2
    min = item1 if len(item1) < len(item2) else item2
    for i in max:
        if i in min and i not in new_item:
            new_item.append(i)
    return new_item

print(excludeitem([1, 2, 2, 3], [7, 2, 5, 3, 3]))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS