Python Quiz

Answer 10 questions and see how you score!

1. Which function returns True if any element in iterable is true?

2. What does the __name__ == "__main__" do?

3. Which function is used to iterate with index in Python?

4. Which function converts a string to a float?

5. Which built-in function returns the type of an object?

6. Which method reverses the order of elements in a list in-place?

7. Which keyword is used for functions?

8. Which statement is used to define an anonymous function?

9. What will print(list(range(2,10,2))) output?

10. Which function formats a string with placeholders?