tuple to string string to tuple code example
Example 1: convert a tuple into string python
tuple_ = 1, 2, 3, 4, 5
str(list(tuple))
Example 2: string to tuple python
string = "mystring"
tuple1 = tuple(string)
# ('m', 'y', ' ', 's', 't', 'r', 'i', 'n', 'g')
tuple2 = string,
# ("my string",)