Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

List to tuple

sample_list = ['Compile', 'With', 'Favtutor']

#unpack list items and form tuple
tuple1 = (*sample_list,)

print(tuple1)
print(type(tuple1))
Source by favtutor.com #
 
PREVIOUS NEXT
Tagged: #List #tuple
ADD COMMENT
Topic
Name
2+7 =