Skip to main content
Chemistry LibreTexts

Python

  • Page ID
    188887
  • 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