Print formatting

Jagga Soorma jagga13 at gmail.com
Fri Oct 18 13:03:26 EDT 2019


Hello,

I am new to python and trying to write a script that outputs some data
about users.  I was able to write it and dump the data but can't seem
to align the output in column 2 correctly.  Here is what I am trying
to do:

--
output:
user1     data1
username2             data2
user3     data3

snip from script:
print(str(temp_list[0]) + "\t\t" + str(temp_list[1]))
--

Adding the tabs does not seem to work and I am sure there is a better
way to do this.  Any help would be appreciated.

Thanks,
-J



More information about the Python-list mailing list