Python: how to enclose a tuple in a tuple

Tuples in python can be nested.

If simply add one tuple to another through the concatenation operation “+”, python will merge the values of the tuples:

In order an added tuple to become nested, put a comma “,” after an added tuple:

 

0 0 votes
Article Rating
Subscribe
Notify of
0 Комментарий
Newest
Oldest Most Voted
Inline Feedbacks
View all comments