How to converte string to tuple in Python

1 Answer

0 votes
s = 'python'

t = tuple(s)

print(t)


'''
run:

('p', 'y', 't', 'h', 'o', 'n')

'''

 



answered Sep 21, 2017 by avibootz

Related questions

1 answer 222 views
222 views asked Sep 21, 2017 by avibootz
1 answer 214 views
1 answer 226 views
1 answer 215 views
1 answer 317 views
1 answer 312 views
2 answers 343 views
343 views asked May 10, 2018 by avibootz
...