Python Tuples

Python Tuple is a collection of items.

Items in a tuple are ordered. So, we can access items in a tuple using index.

Tuple is an iterable object. So, we could iterate over the items of a tuple using for loop.

Tuple is immutable. We can neither append items, delete items nor assign new values for existing items.

Python Tuple Tutorials

Checks

Find

Transformations

  • Python – Reverse a TuplePython Tutorial to reverse the order of elements in given tuple using reversed() builtin function.
  • Python – Sort a TuplePython Tutorial to sort the elements of given tuple in ascending or descending order using sort() builtin function.
  • Python – Slice a TuplePython Tutorial to slice a part of tuple using slice() builtin function.
  • Python – Filter a TuplePython Tutorial to filter the elements in a tuple based on a condition/function using filter() builtin function.

Conversions

Conclusion

In this Python Tutorial, we learned about Python Tuples.