🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: itertools and functools: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. How many items does combinations("ABCD", 2) produce?
  2. Q2. What does this print? (code)
  3. Q3. Choosing a class monitor and a deputy from 10 students is which kind of count?
  4. Q4. What does this print? (code)
  5. Q5. Why should you usually sort before using groupby?
  6. Q6. What does this print? (code)
  7. Q7. What does this print? (code)
  8. Q8. What does partial(int, base=2)("110") return?
  9. Q9. Why should count() or cycle() always be combined with a limit like islice?
  10. Q10. What does cmptokey let you do?