Python Basic

  • python is an interpreter language
Variables and Basic Statements:
  • 2/3 = 0 #python2
    2/3 = 0.67 #python3
  • python variable types: int float char str
  • type coercions: int() float()
    • if a str is formed by all digits, we can convers it to int using int()
  • raw_input() #python2
    input() #python3

你可能感兴趣的:(Python Basic)