Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Chemistry LibreTexts

9.4: Python

( \newcommand{\kernel}{\mathrm{null}\,}\)

Data Types

type() - shows type of data

       
float real number str string (word)
int integer bool boolean

How code behaves depends on data type (+ adds number, but + concatenates strings)

Converting Data Type: str(), int(), float() bool() converts values to the defined type


9.4: Python is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

  • Was this article helpful?

Support Center

How can we help?