In my dessertshop.py, in my Order class I have a __str__ method that prints to the terminal
Question:
In my dessertshop.py, in my Order class I have a __str__ method that prints to the terminal a "table" of all my dessert items in a nice formatted way. I have gotten rid of unnecessary commas in this __str__ method to make it look better. The output of this __str__ method is:
Name Quantity Unit Price Cost Tax
Gummy Bears 0.5lbs $4/lb $2.00 $0.14
Oatmeal Raisin Cookies 2 Cookies $3.45/dozen $0.57 $0.04
Pistachio Ice Cream 2 scoops $0.79/scoop $1.58 $0.11
Hot Fudge Vanilla Sundae 3 scoops $0.69/scoop $3.36 $0.24
Hot Fudge 1 $1.29
In my main function I am trying to feed to my data empty list every row in the output above as a list of lists (every row will be a list with those respective elements in each list) so that then I can import the list 'data' into receipt.py.
How can I iterate through this output, separate each element in each row as elements in a list, and created a list of lists in my data empty list?
Taxation Of Individuals And Business Entities 2016
ISBN: 9781259334870
7th Edition
Authors: Brian Spilker, Benjamin Ayers, John Robinson, Edmund Outslay, Ronald Worsham, John Barrick, Connie Weaver