Data Types Python Built-in Types Beginner
Q Given t = ([1],), what happens with t[0].append(2)?
  • A It succeeds and t becomes ([1, 2],)
  • B AttributeError
  • C t becomes ([1], 2)
  • D TypeError, because tuples are immutable
Leave a Comment