🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Python Variables and Data Types: all 15 questions

Quiz: Python Variables and Data Types · Question 6 of 15

What does this print? (code)

What does this print?

x = 5
x = "five"
print(type(x).__name__)
  1. A.int
  2. B.str
  3. C.An error: x already holds a number
  4. D.five
Answer & explanation

Correct answer: str

Python variables can point to values of any type over time.

Can you get the rest right without peeking?

Take the timed Quiz: Python Variables and Data Types quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →