Python - the default input type input function

Python all input as strings, so if you want to use as other types of data processing, and needs a type of change, such as

= int Number The (the INPUT ( " Enter an integer: " ))

If not the mandatory transition, subsequent calculations might being given the wrong type of character, such as

 

Guess you like

Origin www.cnblogs.com/HuangYuanAvril/p/11209610.html