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 229 views
1 answer 223 views
2 answers 235 views
235 views asked May 10, 2018 by avibootz
2 answers 146 views
1 answer 161 views
1 answer 218 views
...