-1
month = ['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec']  

converting_list = month 

print(converting_list)  

print(type(converting_list))

a tuple out of a list

azro
  • 53,056
  • 7
  • 34
  • 70

3 Answers3

0

Use the tuple() function

month = 
['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec']

converting_list = tuple(month)

print(type(converting_list))

This returns...

<class 'tuple'>

Hope this helps!

Wardy
  • 76
  • 5
0
print(tuple(month))

try this basic to change list directly to tuple without an issue.

0

Just use the tuple method:

list_to_tuple = tuple(month)