We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
if __name__ == '__main__':
str1 = list(input().split(" "))
str2 = list(input().split(" "))
diff1 = [x for x in str1 if x not in str2]
diif2 = [y for y in str2 if y not in str1]
print(len(diff1) + len(diif2))
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Set .symmetric_difference() Operation
You are viewing a single comment's thread. Return to all comments →