Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def compara_letras(palavra1,palavra2):
- lista1 = []
- lista2 = []
- lista1 = "".join(sorted(palavra1))
- lista2 = "".join(sorted(palavra2))
- for i in range(len(lista1)):
- if lista1[i] == lista2[i]:
- check = 1
- else:
- check = 0
- break
- if check == 1:
- print("iguais")
- else:
- print("diferentes")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement