上QQ阅读APP看书,第一时间看更新
Debug and print() – detecting your bugs
We can use the Debug panel (at the bottom of the following screenshot) using print(). So, let's see how print() works by printing both our name and age. We can do this by adding the following:
print(fullName)
print(age)
It should appear on your screen as follows:
You should now see the output in both the Results and Debug Panels. Using print() allows us to see things in our Debug Panel and therefore verify expected results. Using print() is a handy debugging tool.