Can I count on order being preserved in a Python tuple?

  1. Tuple order is as you insert values into the tuple. They’re not going to be sorted as I think you’re asking. zip will again, retain the order you inserted the values in.

  2. It’s an acceptable method, but I have 2 alternate suggestions: Use the copy module, or use dtg1 = mdtimes[:].

  3. Sounds reasonable.

Leave a Comment

tech