{"id":24852,"date":"2021-11-02T09:54:44","date_gmt":"2021-11-02T04:24:44","guid":{"rendered":"https:\/\/python-programs.com\/?p=24852"},"modified":"2021-11-02T09:54:44","modified_gmt":"2021-11-02T04:24:44","slug":"python-tuple-function-with-examples","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-tuple-function-with-examples\/","title":{"rendered":"Python tuple() Function with Examples"},"content":{"rendered":"

tuple() Function in Python:<\/strong><\/p>\n

To create tuples in Python, use the tuple() built-in function.<\/p>\n

A tuple is an immutable sequence type in Python. The tuple() construct is one method for generating tuples.<\/p>\n

Syntax:<\/strong><\/p>\n

tuple(iterable)<\/pre>\n

Parameters<\/strong><\/p>\n

iterable:<\/strong> This is optional.An iterable (list, range, etc.) or an iterator object<\/p>\n