Python Data Types Questions and Answers

Take Exam

Python Programming - Data Types Questions with Answers explain how Python stores and handles different types of data. These Python Data Types Questions are important for TCS, RRB, and SSC exams to strengthen programming fundamentals

Python Data Types

Showing 10 of 24 questions

1. Which of the following is a mutable data type in Python?

  • tuple
  • string
  • list
  • int
Show Answer Report

2. What is the output of: print(type([]))

  • <class 'str'>
  • <class 'list'>
  • <class 'tuple'>
  • <class 'dict'>
Show Answer Report

3. Which data type would be most appropriate for storing a collection of unique items?

  • list
  • tuple
  • set
  • dictionary
Show Answer Report

4. What does the following code return: bool("False")

  • False
  • True
  • Error
  • None
Show Answer Report

5. Which of these is an immutable sequence type?

  • list
  • dictionary
  • set
  • tuple
Show Answer Report

6. What is the data type of (1,)?

  • int
  • tuple
  • list
  • str
Show Answer Report

7. Which method would you use to get all keys from a dictionary?

  • get_keys()
  • keys()
  • all_keys()
  • dict_keys()
Show Answer Report

8. What is the result of: 3 + 4.5

  • 7
  • 7.5
  • Error
  • None
Show Answer Report

9. Which of these creates a set in Python?

  • {}
  • []
  • ()
  • set()
Show Answer Report

10. What does None represent in Python?

  • 0
  • False
  • Null value
  • Empty string
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test