{"action":"created","comment":{"url":"https://api.github.com/repos/Inna88/homeworks_py/pulls/comments/241946111","pull_request_review_id":185351207,"id":241946111,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTk0NjExMQ==","diff_hunk":"@@ -0,0 +1,97 @@\n+# # task 1\n+# # 1.1) отсортировать массив из словарей по значению ключа ‘age' \n+# # 1.2) сгруппировать данные по значению ключа 'city' \n+\n+\n+def task1():\n+    data = [\n+        {'name': 'Viktor', 'city': 'Kiev', 'age': 30},\n+        {'name': 'Maksim', 'city': 'Dnepr', 'age': 20},\n+        {'name': 'Vladimir', 'city': 'Lviv', 'age': 32},\n+        {'name': 'Andrey', 'city': 'Kiev', 'age': 34},\n+        {'name': 'Artem', 'city': 'Dnepr', 'age': 50},\n+        {'name': 'Dmitriy', 'city': 'Lviv', 'age': 21}]\n+    from operator import itemgetter\n+    result = sorted(data, key=itemgetter('age'))\n+    print(\"1.1. Dictionaries are sorted by key 'age': \", result)\n+    import itertools\n+    sorted_data = sorted(data, key=itemgetter('city'))\n+    for key, group in itertools.groupby(sorted_data, key=lambda x: x['city']):\n+        print(key)\n+        print(list(group))\n+\n+\n+task1()\n+\n+\n+# # 2.  У вас есть последовательность строк. Необходимо определить наиболее часто встречающуюся строку в последовательности.\n+\n+\n+def most_frequent():\n+    list_var = ['a', 'a', 'bi', 'bi', 'Bi', 'abc', 'hgf', 'ABC', 'fty', 'abc', 'Abc']\n+    lower_list = [x.lower() for x in list_var]\n+    import collections\n+    import operator\n+    dict_var = collections.Counter(lower_list)\n+    print(max(dict_var.items(), key=operator.itemgetter(1))[0])\n+\n+\n+most_frequent()\n+\n+\n+# # 3.Дано целое число. Необходимо подсчитать произведение всех цифр в этом числе, за исключением нулей.\n+\n+\n+def multiply_numbers():\n+    num = 54307650\n+    num_str = str(num)\n+    my_list = [int(i) for i in list(num_str)]\n+    for x in my_list[1:]:","path":"Homework2.py","position":49,"original_position":49,"commit_id":"c27722690f6fd550bdfaa1efd6819d106431f341","original_commit_id":"c27722690f6fd550bdfaa1efd6819d106431f341","user":{"login":"mmykhailenko","id":44474670,"node_id":"MDQ6VXNlcjQ0NDc0Njcw","avatar_url":"https://avatars2.githubusercontent.com/u/44474670?v=4","gravatar_id":"","url":"https://api.github.com/users/mmykhailenko","html_url":"https://github.com/mmykhailenko","followers_url":"https://api.github.com/users/mmykhailenko/followers","following_url":"https://api.github.com/users/mmykhailenko/following{/other_user}","gists_url":"https://api.github.com/users/mmykhailenko/gists{/gist_id}","starred_url":"https://api.github.com/users/mmykhailenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmykhailenko/subscriptions","organizations_url":"https://api.github.com/users/mmykhailenko/orgs","repos_url":"https://api.github.com/users/mmykhailenko/repos","events_url":"https://api.github.com/users/mmykhailenko/events{/privacy}","received_events_url":"https://api.github.com/users/mmykhailenko/received_events","type":"User","site_admin":false},"body":"x - never use variable ( use _  ). ","created_at":"2018-12-15T11:05:28Z","updated_at":"2018-12-15T11:10:42Z","html_url":"https://github.com/Inna88/homeworks_py/pull/3#discussion_r241946111","pull_request_url":"https://api.github.com/repos/Inna88/homeworks_py/pulls/3","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Inna88/homeworks_py/pulls/comments/241946111"},"html":{"href":"https://github.com/Inna88/homeworks_py/pull/3#discussion_r241946111"},"pull_request":{"href":"https://api.github.com/repos/Inna88/homeworks_py/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/Inna88/homeworks_py/pulls/3","id":237127837,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3MTI3ODM3","html_url":"https://github.com/Inna88/homeworks_py/pull/3","diff_url":"https://github.com/Inna88/homeworks_py/pull/3.diff","patch_url":"https://github.com/Inna88/homeworks_py/pull/3.patch","issue_url":"https://api.github.com/repos/Inna88/homeworks_py/issues/3","number":3,"state":"closed","locked":false,"title":"Updated task5","user":{"login":"Inna88","id":44818672,"node_id":"MDQ6VXNlcjQ0ODE4Njcy","avatar_url":"https://avatars1.githubusercontent.com/u/44818672?v=4","gravatar_id":"","url":"https://api.github.com/users/Inna88","html_url":"https://github.com/Inna88","followers_url":"https://api.github.com/users/Inna88/followers","following_url":"https://api.github.com/users/Inna88/following{/other_user}","gists_url":"https://api.github.com/users/Inna88/gists{/gist_id}","starred_url":"https://api.github.com/users/Inna88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Inna88/subscriptions","organizations_url":"https://api.github.com/users/Inna88/orgs","repos_url":"https://api.github.com/users/Inna88/repos","events_url":"https://api.github.com/users/Inna88/events{/privacy}","received_events_url":"https://api.github.com/users/Inna88/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-12-09T12:34:54Z","updated_at":"2018-12-15T11:10:42Z","closed_at":"2018-12-10T17:17:55Z","merged_at":"2018-12-10T17:17:55Z","merge_commit_sha":"e50f95b4360e46b150601c7dbce9937593605d60","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Inna88/homeworks_py/pulls/3/commits","review_comments_url":"https://api.github.com/repos/Inna88/homeworks_py/pulls/3/comments","review_comment_url":"https://api.github.com/repos/Inna88/homeworks_py/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Inna88/homeworks_py/issues/3/comments","statuses_url":"https://api.github.com/repos/Inna88/homeworks_py/statuses/c27722690f6fd550bdfaa1efd6819d106431f341","head":{"label":"Inna88:draft","ref":"draft","sha":"c27722690f6fd550bdfaa1efd6819d106431f341","user":{"login":"Inna88","id":44818672,"node_id":"MDQ6VXNlcjQ0ODE4Njcy","avatar_url":"https://avatars1.githubusercontent.com/u/44818672?v=4","gravatar_id":"","url":"https://api.github.com/users/Inna88","html_url":"https://github.com/Inna88","followers_url":"https://api.github.com/users/Inna88/followers","following_url":"https://api.github.com/users/Inna88/following{/other_user}","gists_url":"https://api.github.com/users/Inna88/gists{/gist_id}","starred_url":"https://api.github.com/users/Inna88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Inna88/subscriptions","organizations_url":"https://api.github.com/users/Inna88/orgs","repos_url":"https://api.github.com/users/Inna88/repos","events_url":"https://api.github.com/users/Inna88/events{/privacy}","received_events_url":"https://api.github.com/users/Inna88/received_events","type":"User","site_admin":false},"repo":{"id":160572957,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA1NzI5NTc=","name":"homeworks_py","full_name":"Inna88/homeworks_py","private":false,"owner":{"login":"Inna88","id":44818672,"node_id":"MDQ6VXNlcjQ0ODE4Njcy","avatar_url":"https://avatars1.githubusercontent.com/u/44818672?v=4","gravatar_id":"","url":"https://api.github.com/users/Inna88","html_url":"https://github.com/Inna88","followers_url":"https://api.github.com/users/Inna88/followers","following_url":"https://api.github.com/users/Inna88/following{/other_user}","gists_url":"https://api.github.com/users/Inna88/gists{/gist_id}","starred_url":"https://api.github.com/users/Inna88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Inna88/subscriptions","organizations_url":"https://api.github.com/users/Inna88/orgs","repos_url":"https://api.github.com/users/Inna88/repos","events_url":"https://api.github.com/users/Inna88/events{/privacy}","received_events_url":"https://api.github.com/users/Inna88/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Inna88/homeworks_py","description":null,"fork":false,"url":"https://api.github.com/repos/Inna88/homeworks_py","forks_url":"https://api.github.com/repos/Inna88/homeworks_py/forks","keys_url":"https://api.github.com/repos/Inna88/homeworks_py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Inna88/homeworks_py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Inna88/homeworks_py/teams","hooks_url":"https://api.github.com/repos/Inna88/homeworks_py/hooks","issue_events_url":"https://api.github.com/repos/Inna88/homeworks_py/issues/events{/number}","events_url":"https://api.github.com/repos/Inna88/homeworks_py/events","assignees_url":"https://api.github.com/repos/Inna88/homeworks_py/assignees{/user}","branches_url":"https://api.github.com/repos/Inna88/homeworks_py/branches{/branch}","tags_url":"https://api.github.com/repos/Inna88/homeworks_py/tags","blobs_url":"https://api.github.com/repos/Inna88/homeworks_py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Inna88/homeworks_py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Inna88/homeworks_py/git/refs{/sha}","trees_url":"https://api.github.com/repos/Inna88/homeworks_py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Inna88/homeworks_py/statuses/{sha}","languages_url":"https://api.github.com/repos/Inna88/homeworks_py/languages","stargazers_url":"https://api.github.com/repos/Inna88/homeworks_py/stargazers","contributors_url":"https://api.github.com/repos/Inna88/homeworks_py/contributors","subscribers_url":"https://api.github.com/repos/Inna88/homeworks_py/subscribers","subscription_url":"https://api.github.com/repos/Inna88/homeworks_py/subscription","commits_url":"https://api.github.com/repos/Inna88/homeworks_py/commits{/sha}","git_commits_url":"https://api.github.com/repos/Inna88/homeworks_py/git/commits{/sha}","comments_url":"https://api.github.com/repos/Inna88/homeworks_py/comments{/number}","issue_comment_url":"https://api.github.com/repos/Inna88/homeworks_py/issues/comments{/number}","contents_url":"https://api.github.com/repos/Inna88/homeworks_py/contents/{+path}","compare_url":"https://api.github.com/repos/Inna88/homeworks_py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Inna88/homeworks_py/merges","archive_url":"https://api.github.com/repos/Inna88/homeworks_py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Inna88/homeworks_py/downloads","issues_url":"https://api.github.com/repos/Inna88/homeworks_py/issues{/number}","pulls_url":"https://api.github.com/repos/Inna88/homeworks_py/pulls{/number}","milestones_url":"https://api.github.com/repos/Inna88/homeworks_py/milestones{/number}","notifications_url":"https://api.github.com/repos/Inna88/homeworks_py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Inna88/homeworks_py/labels{/name}","releases_url":"https://api.github.com/repos/Inna88/homeworks_py/releases{/id}","deployments_url":"https://api.github.com/repos/Inna88/homeworks_py/deployments","created_at":"2018-12-05T20:14:45Z","updated_at":"2018-12-10T17:17:57Z","pushed_at":"2018-12-11T21:53:02Z","git_url":"git://github.com/Inna88/homeworks_py.git","ssh_url":"git@github.com:Inna88/homeworks_py.git","clone_url":"https://github.com/Inna88/homeworks_py.git","svn_url":"https://github.com/Inna88/homeworks_py","homepage":null,"size":8,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Inna88:master","ref":"master","sha":"269615267fe7fd0cc1fb97cc1298ae5e25bc38ef","user":{"login":"Inna88","id":44818672,"node_id":"MDQ6VXNlcjQ0ODE4Njcy","avatar_url":"https://avatars1.githubusercontent.com/u/44818672?v=4","gravatar_id":"","url":"https://api.github.com/users/Inna88","html_url":"https://github.com/Inna88","followers_url":"https://api.github.com/users/Inna88/followers","following_url":"https://api.github.com/users/Inna88/following{/other_user}","gists_url":"https://api.github.com/users/Inna88/gists{/gist_id}","starred_url":"https://api.github.com/users/Inna88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Inna88/subscriptions","organizations_url":"https://api.github.com/users/Inna88/orgs","repos_url":"https://api.github.com/users/Inna88/repos","events_url":"https://api.github.com/users/Inna88/events{/privacy}","received_events_url":"https://api.github.com/users/Inna88/received_events","type":"User","site_admin":false},"repo":{"id":160572957,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA1NzI5NTc=","name":"homeworks_py","full_name":"Inna88/homeworks_py","private":false,"owner":{"login":"Inna88","id":44818672,"node_id":"MDQ6VXNlcjQ0ODE4Njcy","avatar_url":"https://avatars1.githubusercontent.com/u/44818672?v=4","gravatar_id":"","url":"https://api.github.com/users/Inna88","html_url":"https://github.com/Inna88","followers_url":"https://api.github.com/users/Inna88/followers","following_url":"https://api.github.com/users/Inna88/following{/other_user}","gists_url":"https://api.github.com/users/Inna88/gists{/gist_id}","starred_url":"https://api.github.com/users/Inna88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Inna88/subscriptions","organizations_url":"https://api.github.com/users/Inna88/orgs","repos_url":"https://api.github.com/users/Inna88/repos","events_url":"https://api.github.com/users/Inna88/events{/privacy}","received_events_url":"https://api.github.com/users/Inna88/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Inna88/homeworks_py","description":null,"fork":false,"url":"https://api.github.com/repos/Inna88/homeworks_py","forks_url":"https://api.github.com/repos/Inna88/homeworks_py/forks","keys_url":"https://api.github.com/repos/Inna88/homeworks_py/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Inna88/homeworks_py/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Inna88/homeworks_py/teams","hooks_url":"https://api.github.com/repos/Inna88/homeworks_py/hooks","issue_events_url":"https://api.github.com/repos/Inna88/homeworks_py/issues/events{/number}","events_url":"https://api.github.com/repos/Inna88/homeworks_py/events","assignees_url":"https://api.github.com/repos/Inna88/homeworks_py/assignees{/user}","branches_url":"https://api.github.com/repos/Inna88/homeworks_py/branches{/branch}","tags_url":"https://api.github.com/repos/Inna88/homeworks_py/tags","blobs_url":"https://api.github.com/repos/Inna88/homeworks_py/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Inna88/homeworks_py/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Inna88/homeworks_py/git/refs{/sha}","trees_url":"https://api.github.com/repos/Inna88/homeworks_py/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Inna88/homeworks_py/statuses/{sha}","languages_url":"https://api.github.com/repos/Inna88/homeworks_py/languages","stargazers_url":"https://api.github.com/repos/Inna88/homeworks_py/stargazers","contributors_url":"https://api.github.com/repos/Inna88/homeworks_py/contributors","subscribers_url":"https://api.github.com/repos/Inna88/homeworks_py/subscribers","subscription_url":"https://api.github.com/repos/Inna88/homeworks_py/subscription","commits_url":"https://api.github.com/repos/Inna88/homeworks_py/commits{/sha}","git_commits_url":"https://api.github.com/repos/Inna88/homeworks_py/git/commits{/sha}","comments_url":"https://api.github.com/repos/Inna88/homeworks_py/comments{/number}","issue_comment_url":"https://api.github.com/repos/Inna88/homeworks_py/issues/comments{/number}","contents_url":"https://api.github.com/repos/Inna88/homeworks_py/contents/{+path}","compare_url":"https://api.github.com/repos/Inna88/homeworks_py/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Inna88/homeworks_py/merges","archive_url":"https://api.github.com/repos/Inna88/homeworks_py/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Inna88/homeworks_py/downloads","issues_url":"https://api.github.com/repos/Inna88/homeworks_py/issues{/number}","pulls_url":"https://api.github.com/repos/Inna88/homeworks_py/pulls{/number}","milestones_url":"https://api.github.com/repos/Inna88/homeworks_py/milestones{/number}","notifications_url":"https://api.github.com/repos/Inna88/homeworks_py/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Inna88/homeworks_py/labels{/name}","releases_url":"https://api.github.com/repos/Inna88/homeworks_py/releases{/id}","deployments_url":"https://api.github.com/repos/Inna88/homeworks_py/deployments","created_at":"2018-12-05T20:14:45Z","updated_at":"2018-12-10T17:17:57Z","pushed_at":"2018-12-11T21:53:02Z","git_url":"git://github.com/Inna88/homeworks_py.git","ssh_url":"git@github.com:Inna88/homeworks_py.git","clone_url":"https://github.com/Inna88/homeworks_py.git","svn_url":"https://github.com/Inna88/homeworks_py","homepage":null,"size":8,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Inna88/homeworks_py/pulls/3"},"html":{"href":"https://github.com/Inna88/homeworks_py/pull/3"},"issue":{"href":"https://api.github.com/repos/Inna88/homeworks_py/issues/3"},"comments":{"href":"https://api.github.com/repos/Inna88/homeworks_py/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/Inna88/homeworks_py/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/Inna88/homeworks_py/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Inna88/homeworks_py/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/Inna88/homeworks_py/statuses/c27722690f6fd550bdfaa1efd6819d106431f341"}},"author_association":"OWNER"}}
{"actor":{"display_login":"mmykhailenko"}}