I want to convert a tuple which contains strings and integers into a string, I have tried using the '.join' method but this only seems to work for a tuple of strings.
Can anyone help me? I am using Python 3.5, thanks!
This Might Help
>>> a = ( "aty",3,"bob",5,6)
>>> tuple(map( str , a ) )
('aty', '3', 'bob', '5', '6')
" ".join(map(str,my_list))
I guess ...
or " ".join(str(x) for x in my_list)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With