How to use python numeric types
This article introduces the relevant knowledge of "how to use python numerical types". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
1. Numerical types can be converted into each other. If two different types are added together, the type with a smaller range will be automatically converted into a type with a larger range.
> var1 = 1 + 2 > var2 = 1 + 2 > type (var1) > type (var2) > var13 > var23.0
2. Logical operators can be used for numeric variables.
> a = 3 > b = 6.9 > a_and_b = an and b > a_or_b = an or b > a_and_b6.9 > type (a_and_b) > a_or_b3 > type (a_or_b) "how to use python numerical types" is introduced here, thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!