How to Make a Tuple in Python


In this example, we will learn how to make a tuple with the tuple() constructor in Python.

Source Code

my_tuple = tuple(('a', 'b', 'c', 'd'))

print(my_tuple)

Output:

('a', 'b', 'c', 'd')
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments