-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class_person v1 #844
base: master
Are you sure you want to change the base?
class_person v1 #844
Conversation
app/main.py
Outdated
@@ -1,8 +1,20 @@ | |||
class Person: | |||
# write your code here | |||
pass | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove a blank line
app/main.py
Outdated
# write your code here | ||
pass | ||
person_list = [Person(item["name"], item["age"]) for item in people] | ||
for item in people: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a more descriptive variable name than item
to enhance code readability.By using person
as the variable name,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
No description provided.