Nauč se Python > Materiály > Snake Workshop for PyLadies > Introduction to Python > Type conversion

Type conversion – Řešení [0]

An error will occur!

>>> int('hello')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: 'hello'

The sentence contains useful information. The most important thing is the ValueError, which indicates an error in the value.


Toto je stránka lekce z kurzu, který probíhá nebo proběhl naživo s instruktorem.