[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Print formatting


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:

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.