Put in order · Python course · Module 1: Python Basics

Type Checking

Order the code that checks a variable's type:

Items to put in order

  • data_type = type(data)
  • print(data_type)
  • data = 42
Show the answer

Correct order:

  1. data = 42
  2. data_type = type(data)
  3. print(data_type)