python how to align text writen to a file

Solutions on MaxInterview for python how to align text writen to a file by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "python how to align text writen to a file"
Brook
23 Sep 2019
1file = open(file, "a") 
2table_data = [
3    ['a', 'b', 'c'],
4    ['aaaaaaaaaa', 'b', 'c'], 
5    ['a', 'bbbbbbbbbb', 'c']
6]
7for row in table_data:
8    file.write("{: >20} {: >20} {: >20}".format(*row))