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

Quiz: itertools and functools · Question 2 of 10

What does this print? (code)

What does this print?

from itertools import permutations
print(len(list(permutations("ABC"))))
  1. A.3
  2. B.9
  3. C.6
  4. D.27
Answer & explanation

Correct answer: 6

3! = 6 arrangements of three letters.

Can you get the rest right without peeking?

Take the timed Quiz: itertools and functools quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →