I am still a beginner to Python and have the following code to write about 14 variables to a file:
Everything works fine -- no problems. My questions:
1. If I have say 100 variables, do I follow the same logic/pattern?
2. Is there a better/faster/simpler way to write many variables?
thanks
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
f.write( '{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {}\n' . format ################### WRITE THE TAXABLE CATEGORY (year, yourage, herage, round (begintaxableequity), round (endtaxableequity), round (begintaxablefixedincome), round (fixedincome), round (endtaxablefixedincome), round (begintaxablecash), round (cashincome), round (endtaxablecash), round (totaltaxableassets), round (totaltaxabledivincome), taxableequitygwth, taxablefixedincomediv, taxablecashdiv)) |
1. If I have say 100 variables, do I follow the same logic/pattern?
2. Is there a better/faster/simpler way to write many variables?
thanks