Question · Python course · Module 1: Python Basics

Summary - Conversion

What happens when you run int('42.5')?

Answer options

  • 42
  • 42.5
  • A ValueError
  • '42'
Show the answer

Correct answer:

  • A ValueError