-
Notifications
You must be signed in to change notification settings - Fork 10
Tasks #2
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
base: master
Are you sure you want to change the base?
Tasks #2
Conversation
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.
str(''.join([str(i) for i in a])) это масло масляное, ''.join([str(i) for i in a])это уже строка.
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.
''.join([str(i) for i in a]) это почти тоже самое, что и ''.join((str(i) for i in a)), что можно сократить до ''.join(str(i) for i in a)
Больше пробеловПо PEP8 нужно ставить пробелы вокруг бинарных операторов: После запятых пробелы надо ставить всегда, даже в русском языке =) Pycharm умеет делать реформат кода |
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.
seq объявляется тут...
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.
лучше вместо цикла записать
sum += sum(i for i in values if i > 0)
где первый sum это переменная, а второй -- та самая build-in функция
|
В целом хорошо =)
|
No description provided.