printing tab-separated values of a list printing tab-separated values of a list python-3.x python-3.x

printing tab-separated values of a list


print(*list, sep='\t')

Note that you shouldn't use the word list as a variable name, since it's the name of a builtin type.


print('\t'.join(map(str,list)))


print('\t'.join([str(x) for x in list]))