Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

String functions and methods (len, upper, lower)

  • len
  • upper
  • lower
a = "xYz"
print(len(a))     # 3

b = a.upper()
print(b)          # XYZ
print(a)          # xYz   - immutable!
print(a.lower())  # xyz