One day someone tells Pierre that there is a sweet shop across the street named
"Olivier and Bhalla's Store for Something Sweet". This was very frustrating. Pierre
contacted the authorities about the knockoff right away. The government ruled that if
the name of a knockoff brand has more than 3 different letters than the original
companies name, they are considered a novelty and are allowed to continue operating.
If the name of the knockoff company is within 3 (inclusive) letters of the original
companies name, then they are labelled as a knock off and should be closed down.
Create a function that takes two different company names, and returns wether or not
the imposter company is a Novelty, or a Knockoff.
my function dosent work pls help me with an example wat the final function looks like:
def func(s1, s2):
if len(set(s1) - set(s2)) <= 3:
return 'Knockoff'
return 'Novelty'
Comments
Leave a comment