Answers for "initialise tuple in python"

0

initialise tuple in python

# Method 1, convert list to tuple:
values = ['a', 'b', 'c']

tup = tuple(values)

# Method 2:
tup = ('a', 'b', 'c')
Posted by: Guest on January-19-2022

Python Answers by Framework

Browse Popular Code Answers by Language