Python Notes

  • difference between raw_input and input: raw_input takes everything as string, while input treat everything as non-string or expression.
  • str() or `` or repr(): convert other types into string
  • import math, math.sqrt(81)
  • family=['mom','dad','brother'] family[-1]='brother'
  • 'abcd'[-1] = 'd'