Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

380974261314kv
Copy link

No description provided.

app/main.py Outdated
@@ -1,8 +1,20 @@
class Person:
# write your code here
pass

Copy link
Contributor

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:
Copy link
Contributor

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,

1.Removed an empty line.
2.Changed variable's name from "item" to "person".
Copy link
Contributor

@viktoria-rybenchuk viktoria-rybenchuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants