Tuples and sets · 11 / 16 Exercise Medium

Same letters

Objective

Create a Python program that checks whether two words are made of the same distinct letters, regardless of the order or how many times each one is repeated.

Instructions

  • Read two lower-case words, one per line.
  • Convert each word into a set of letters.
  • Show True if both sets are equal and False otherwise.
Input
roma
amor
Output
True

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise