--- id: practical-python-1.12 source_exercise_id: "1.12" title: "A Mystery" section: "1.3 Numbers" source_path: "01_Introduction/03_Numbers.md" source_repo: "https://github.com/dabeaz-course/practical-python" source_commit: "93dca856b41c61a0a0f85ae334116e4c125629ea" student_visible_solution: false has_private_solution: false skip: false --- # Exercise 1.12: A Mystery > Source: Practical Python Programming, `01_Introduction/03_Numbers.md`. ### Exercise 1.12: A Mystery `int()` and `float()` can be used to convert numbers. For example, ```python >>> int("123") 123 >>> float("1.23") 1.23 >>> ``` With that in mind, can you explain this behavior? ```python >>> bool("False") True >>> ``` [Contents](../Contents.md) \| [Previous (1.2 A First Program)](02_Hello_world.md) \| [Next (1.4 Strings)](04_Strings.md) ## 关联来源 - [[summaries/03_Numbers]]