Python program to convert a string into tuple.

 Code:-

mystring=“Easycodingzone”
mytuple=tuple(x for x in mystring)
print(mytuple)

Output:-


(‘E’, ‘a’, ‘s’, ‘y’, ‘c’, ‘o’, ‘d’, ‘i’, ‘n’, ‘g’, ‘z’, ‘o’, ‘n’, ‘e’)



Leave a Reply

Your email address will not be published.