Hi,
If I have a list of strings, it's easy to output them using .join(). For example:
mylist=['hi', 'there', 'girls']
myout='\t'.join(mylist)
What I want to know is if there is a builtin python method that acts like join, except it automatically converts ints and floats to strings without giving a Type Error. For example, it would not error with this:
mylist=['hi', 'there', 'girls', 5000]
myout='\t'.join(mylist)
TypeError: sequence item 1: expected string, int found
I understand that I can simply fix mylist in one line with:
my_newlist=[str(entry) for entry in mylist]
However, this is such a common operation that I thought I'd ask around if there's a way to get .join() or a related module to work this way automatically.