Pergunta de entrevista da empresa Amplify

Write a function that accepts two strings, and returns true if string 2 contains all the characters of string 1.

Resposta da entrevista

Sigiloso

19 de mai. de 2015

Probably not the prettiest solution that 5 minutes will get you... def compare_strings(string1, string2): return sorted([y for i in range(len(string1.split())) for y in string1.split()[i]]) == sorted([y for i in range(len(string2.split())) for y in string2.split()[i]])