🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: The collections Module: all 10 questions

Quiz: The collections Module · Question 9 of 10

What does this print? (code)

What does this print?

from collections import Counter
print(Counter("abc") == Counter("cab"))
  1. A.True
  2. B.False
  3. C.An error
  4. D.None
Answer & explanation

Correct answer: True

Same letters with the same counts: the two words are anagrams.

Can you get the rest right without peeking?

Take the timed Quiz: The collections Module quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →