Easy Tutorial
❮ Ref Set Union Python Month Days ❯

Python3 tuple Function

Python3 Built-in Functions


Description

The tuple function converts an iterable series (such as a list) into a tuple.

Syntax

Here is the syntax for tuple:

tuple( iterable )

Parameters

Return Value

Returns a tuple.


Examples

The following demonstrates the use of tuple:

>>> list1 = ['Google', 'Taobao', 'tutorialpro', 'Baidu']
>>> tuple1 = tuple(list1)
>>> tuple1
('Google', 'Taobao', 'tutorialpro', 'Baidu')

Python3 Built-in Functions

❮ Ref Set Union Python Month Days ❯