← 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 →- Q1. How many items does combinations("ABCD", 2) produce?
- Q2. What does this print? (code)
- Q3. Choosing a class monitor and a deputy from 10 students is which kind of count?
- Q4. What does this print? (code)
- Q5. Why should you usually sort before using groupby?
- Q6. What does this print? (code)
- Q7. What does this print? (code)
- Q8. What does partial(int, base=2)("110") return?
- Q9. Why should count() or cycle() always be combined with a limit like islice?
- Q10. What does cmptokey let you do?