How to convert a tuple to a string in Python

1 Answer

0 votes
tpl = (5, 7.8, 10, 3.14, 178)

_str = ' '.join(map(str, tpl))

print(_str) 

 
   
   
   
'''
run:
   
5 7.8 10 3.14 178
 
'''

 



answered Jul 24, 2022 by avibootz

Related questions

1 answer 317 views
1 answer 313 views
2 answers 344 views
344 views asked May 10, 2018 by avibootz
2 answers 279 views
1 answer 250 views
1 answer 336 views
...