{"action":"created","comment":{"url":"https://api.github.com/repos/moverest/club-algo-problemes/pulls/comments/223342871","pull_request_review_id":162443887,"id":223342871,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzM0Mjg3MQ==","diff_hunk":"@@ -0,0 +1,19 @@\n+Dico = open(\"liste_mots.txt\").read().split(\"\\n\")\n+\n+Anagrammes = {}\n+for mot in Dico :\n+    L = [0]*256\n+    for c in mot :\n+        L[ord(c)] += 1\n+    # Python ne peut hasher les listes mais peut le faire sur les tuples.\n+    # Ici, le tuple est hashé implicitement.\n+    T = tuple(L)\n+    if T in Anagrammes : Anagrammes[T].append(mot)\n+    else : Anagrammes[T] = [mot]\n+\n+for h in Anagrammes :\n+    if len(Anagrammes[h]) > 1 :\n+        s = \"\"\n+        for mot in Anagrammes[h] :\n+            s += \" | \"+mot\n+        print(s)","path":"anagrammes/solutions/fabien_bernier.py","position":19,"original_position":19,"commit_id":"449b4ca6cbdf7005252d9c06d2357838a411922e","original_commit_id":"449b4ca6cbdf7005252d9c06d2357838a411922e","user":{"login":"moverest","id":19509728,"node_id":"MDQ6VXNlcjE5NTA5NzI4","avatar_url":"https://avatars1.githubusercontent.com/u/19509728?v=4","gravatar_id":"","url":"https://api.github.com/users/moverest","html_url":"https://github.com/moverest","followers_url":"https://api.github.com/users/moverest/followers","following_url":"https://api.github.com/users/moverest/following{/other_user}","gists_url":"https://api.github.com/users/moverest/gists{/gist_id}","starred_url":"https://api.github.com/users/moverest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moverest/subscriptions","organizations_url":"https://api.github.com/users/moverest/orgs","repos_url":"https://api.github.com/users/moverest/repos","events_url":"https://api.github.com/users/moverest/events{/privacy}","received_events_url":"https://api.github.com/users/moverest/received_events","type":"User","site_admin":false},"body":"Tu peux remplacer tout ça par:\r\n```python\r\nprint(Anagrammes[h].join(\" | \"))\r\n```","created_at":"2018-10-08T12:20:18Z","updated_at":"2018-10-08T12:21:23Z","html_url":"https://github.com/moverest/club-algo-problemes/pull/4#discussion_r223342871","pull_request_url":"https://api.github.com/repos/moverest/club-algo-problemes/pulls/4","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/moverest/club-algo-problemes/pulls/comments/223342871"},"html":{"href":"https://github.com/moverest/club-algo-problemes/pull/4#discussion_r223342871"},"pull_request":{"href":"https://api.github.com/repos/moverest/club-algo-problemes/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/moverest/club-algo-problemes/pulls/4","id":221088185,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMDg4MTg1","html_url":"https://github.com/moverest/club-algo-problemes/pull/4","diff_url":"https://github.com/moverest/club-algo-problemes/pull/4.diff","patch_url":"https://github.com/moverest/club-algo-problemes/pull/4.patch","issue_url":"https://api.github.com/repos/moverest/club-algo-problemes/issues/4","number":4,"state":"open","locked":false,"title":"Anagrammes : moyennement court sans utilisation de librairie. ~ Fabien","user":{"login":"Locust2520","id":33117920,"node_id":"MDQ6VXNlcjMzMTE3OTIw","avatar_url":"https://avatars1.githubusercontent.com/u/33117920?v=4","gravatar_id":"","url":"https://api.github.com/users/Locust2520","html_url":"https://github.com/Locust2520","followers_url":"https://api.github.com/users/Locust2520/followers","following_url":"https://api.github.com/users/Locust2520/following{/other_user}","gists_url":"https://api.github.com/users/Locust2520/gists{/gist_id}","starred_url":"https://api.github.com/users/Locust2520/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Locust2520/subscriptions","organizations_url":"https://api.github.com/users/Locust2520/orgs","repos_url":"https://api.github.com/users/Locust2520/repos","events_url":"https://api.github.com/users/Locust2520/events{/privacy}","received_events_url":"https://api.github.com/users/Locust2520/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-08T11:47:38Z","updated_at":"2018-10-08T12:21:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6954ff606257376c648d098f644b20e9835f0a8c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/moverest/club-algo-problemes/pulls/4/commits","review_comments_url":"https://api.github.com/repos/moverest/club-algo-problemes/pulls/4/comments","review_comment_url":"https://api.github.com/repos/moverest/club-algo-problemes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/moverest/club-algo-problemes/issues/4/comments","statuses_url":"https://api.github.com/repos/moverest/club-algo-problemes/statuses/449b4ca6cbdf7005252d9c06d2357838a411922e","head":{"label":"Locust2520:patch-1","ref":"patch-1","sha":"449b4ca6cbdf7005252d9c06d2357838a411922e","user":{"login":"Locust2520","id":33117920,"node_id":"MDQ6VXNlcjMzMTE3OTIw","avatar_url":"https://avatars1.githubusercontent.com/u/33117920?v=4","gravatar_id":"","url":"https://api.github.com/users/Locust2520","html_url":"https://github.com/Locust2520","followers_url":"https://api.github.com/users/Locust2520/followers","following_url":"https://api.github.com/users/Locust2520/following{/other_user}","gists_url":"https://api.github.com/users/Locust2520/gists{/gist_id}","starred_url":"https://api.github.com/users/Locust2520/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Locust2520/subscriptions","organizations_url":"https://api.github.com/users/Locust2520/orgs","repos_url":"https://api.github.com/users/Locust2520/repos","events_url":"https://api.github.com/users/Locust2520/events{/privacy}","received_events_url":"https://api.github.com/users/Locust2520/received_events","type":"User","site_admin":false},"repo":{"id":152070549,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIwNzA1NDk=","name":"club-algo-problemes","full_name":"Locust2520/club-algo-problemes","private":false,"owner":{"login":"Locust2520","id":33117920,"node_id":"MDQ6VXNlcjMzMTE3OTIw","avatar_url":"https://avatars1.githubusercontent.com/u/33117920?v=4","gravatar_id":"","url":"https://api.github.com/users/Locust2520","html_url":"https://github.com/Locust2520","followers_url":"https://api.github.com/users/Locust2520/followers","following_url":"https://api.github.com/users/Locust2520/following{/other_user}","gists_url":"https://api.github.com/users/Locust2520/gists{/gist_id}","starred_url":"https://api.github.com/users/Locust2520/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Locust2520/subscriptions","organizations_url":"https://api.github.com/users/Locust2520/orgs","repos_url":"https://api.github.com/users/Locust2520/repos","events_url":"https://api.github.com/users/Locust2520/events{/privacy}","received_events_url":"https://api.github.com/users/Locust2520/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Locust2520/club-algo-problemes","description":"Problèmes et solutions des problèmes proposés au Club Algo.","fork":true,"url":"https://api.github.com/repos/Locust2520/club-algo-problemes","forks_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/forks","keys_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/teams","hooks_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/hooks","issue_events_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/issues/events{/number}","events_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/events","assignees_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/assignees{/user}","branches_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/branches{/branch}","tags_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/tags","blobs_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/git/refs{/sha}","trees_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/statuses/{sha}","languages_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/languages","stargazers_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/stargazers","contributors_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/contributors","subscribers_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/subscribers","subscription_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/subscription","commits_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/commits{/sha}","git_commits_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/git/commits{/sha}","comments_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/comments{/number}","issue_comment_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/issues/comments{/number}","contents_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/contents/{+path}","compare_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/merges","archive_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/downloads","issues_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/issues{/number}","pulls_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/pulls{/number}","milestones_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/milestones{/number}","notifications_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/labels{/name}","releases_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/releases{/id}","deployments_url":"https://api.github.com/repos/Locust2520/club-algo-problemes/deployments","created_at":"2018-10-08T11:44:09Z","updated_at":"2018-10-08T11:44:11Z","pushed_at":"2018-10-08T11:46:40Z","git_url":"git://github.com/Locust2520/club-algo-problemes.git","ssh_url":"git@github.com:Locust2520/club-algo-problemes.git","clone_url":"https://github.com/Locust2520/club-algo-problemes.git","svn_url":"https://github.com/Locust2520/club-algo-problemes","homepage":null,"size":11,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"moverest:master","ref":"master","sha":"5ce227caea2cab587df4ed8e07c698cf9aa8b229","user":{"login":"moverest","id":19509728,"node_id":"MDQ6VXNlcjE5NTA5NzI4","avatar_url":"https://avatars1.githubusercontent.com/u/19509728?v=4","gravatar_id":"","url":"https://api.github.com/users/moverest","html_url":"https://github.com/moverest","followers_url":"https://api.github.com/users/moverest/followers","following_url":"https://api.github.com/users/moverest/following{/other_user}","gists_url":"https://api.github.com/users/moverest/gists{/gist_id}","starred_url":"https://api.github.com/users/moverest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moverest/subscriptions","organizations_url":"https://api.github.com/users/moverest/orgs","repos_url":"https://api.github.com/users/moverest/repos","events_url":"https://api.github.com/users/moverest/events{/privacy}","received_events_url":"https://api.github.com/users/moverest/received_events","type":"User","site_admin":false},"repo":{"id":150546300,"node_id":"MDEwOlJlcG9zaXRvcnkxNTA1NDYzMDA=","name":"club-algo-problemes","full_name":"moverest/club-algo-problemes","private":false,"owner":{"login":"moverest","id":19509728,"node_id":"MDQ6VXNlcjE5NTA5NzI4","avatar_url":"https://avatars1.githubusercontent.com/u/19509728?v=4","gravatar_id":"","url":"https://api.github.com/users/moverest","html_url":"https://github.com/moverest","followers_url":"https://api.github.com/users/moverest/followers","following_url":"https://api.github.com/users/moverest/following{/other_user}","gists_url":"https://api.github.com/users/moverest/gists{/gist_id}","starred_url":"https://api.github.com/users/moverest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moverest/subscriptions","organizations_url":"https://api.github.com/users/moverest/orgs","repos_url":"https://api.github.com/users/moverest/repos","events_url":"https://api.github.com/users/moverest/events{/privacy}","received_events_url":"https://api.github.com/users/moverest/received_events","type":"User","site_admin":false},"html_url":"https://github.com/moverest/club-algo-problemes","description":"Problèmes et solutions des problèmes proposés au Club Algo.","fork":false,"url":"https://api.github.com/repos/moverest/club-algo-problemes","forks_url":"https://api.github.com/repos/moverest/club-algo-problemes/forks","keys_url":"https://api.github.com/repos/moverest/club-algo-problemes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moverest/club-algo-problemes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moverest/club-algo-problemes/teams","hooks_url":"https://api.github.com/repos/moverest/club-algo-problemes/hooks","issue_events_url":"https://api.github.com/repos/moverest/club-algo-problemes/issues/events{/number}","events_url":"https://api.github.com/repos/moverest/club-algo-problemes/events","assignees_url":"https://api.github.com/repos/moverest/club-algo-problemes/assignees{/user}","branches_url":"https://api.github.com/repos/moverest/club-algo-problemes/branches{/branch}","tags_url":"https://api.github.com/repos/moverest/club-algo-problemes/tags","blobs_url":"https://api.github.com/repos/moverest/club-algo-problemes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moverest/club-algo-problemes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moverest/club-algo-problemes/git/refs{/sha}","trees_url":"https://api.github.com/repos/moverest/club-algo-problemes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moverest/club-algo-problemes/statuses/{sha}","languages_url":"https://api.github.com/repos/moverest/club-algo-problemes/languages","stargazers_url":"https://api.github.com/repos/moverest/club-algo-problemes/stargazers","contributors_url":"https://api.github.com/repos/moverest/club-algo-problemes/contributors","subscribers_url":"https://api.github.com/repos/moverest/club-algo-problemes/subscribers","subscription_url":"https://api.github.com/repos/moverest/club-algo-problemes/subscription","commits_url":"https://api.github.com/repos/moverest/club-algo-problemes/commits{/sha}","git_commits_url":"https://api.github.com/repos/moverest/club-algo-problemes/git/commits{/sha}","comments_url":"https://api.github.com/repos/moverest/club-algo-problemes/comments{/number}","issue_comment_url":"https://api.github.com/repos/moverest/club-algo-problemes/issues/comments{/number}","contents_url":"https://api.github.com/repos/moverest/club-algo-problemes/contents/{+path}","compare_url":"https://api.github.com/repos/moverest/club-algo-problemes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moverest/club-algo-problemes/merges","archive_url":"https://api.github.com/repos/moverest/club-algo-problemes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moverest/club-algo-problemes/downloads","issues_url":"https://api.github.com/repos/moverest/club-algo-problemes/issues{/number}","pulls_url":"https://api.github.com/repos/moverest/club-algo-problemes/pulls{/number}","milestones_url":"https://api.github.com/repos/moverest/club-algo-problemes/milestones{/number}","notifications_url":"https://api.github.com/repos/moverest/club-algo-problemes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moverest/club-algo-problemes/labels{/name}","releases_url":"https://api.github.com/repos/moverest/club-algo-problemes/releases{/id}","deployments_url":"https://api.github.com/repos/moverest/club-algo-problemes/deployments","created_at":"2018-09-27T07:24:46Z","updated_at":"2018-10-07T14:19:21Z","pushed_at":"2018-10-08T11:47:39Z","git_url":"git://github.com/moverest/club-algo-problemes.git","ssh_url":"git@github.com:moverest/club-algo-problemes.git","clone_url":"https://github.com/moverest/club-algo-problemes.git","svn_url":"https://github.com/moverest/club-algo-problemes","homepage":null,"size":11,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":3,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/moverest/club-algo-problemes/pulls/4"},"html":{"href":"https://github.com/moverest/club-algo-problemes/pull/4"},"issue":{"href":"https://api.github.com/repos/moverest/club-algo-problemes/issues/4"},"comments":{"href":"https://api.github.com/repos/moverest/club-algo-problemes/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/moverest/club-algo-problemes/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/moverest/club-algo-problemes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/moverest/club-algo-problemes/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/moverest/club-algo-problemes/statuses/449b4ca6cbdf7005252d9c06d2357838a411922e"}},"author_association":"NONE"}}
{"actor":{"display_login":"moverest"}}