Hi, could some one explain me this? the following bit of code belongs to the budget app project of Python course:
“food = budget.Category(“Food”)”
food is an object
what is budget?
What is Category?
I know that Category should be a class but i don´t understand the syntax budget.Category()
budget
is name of the module, you can see it imported at the top of main.py
. The budget
module corresponds to the budget.py
file. Then in that module there is (or rather should be) defined Category
class.
1 Like
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.