2017-07-12から1日間の記事一覧

pipでWebスクレイピングライブラリScrapyのインストール(Python3)

環境 $ python -V Python 3.6.1 $ pip -V pip 9.0.1 Scrapyとは? これ Scrapy | A Fast and Powerful Scraping and Web Crawling Framework pipでScrapyをインストールする $ pip install Scrapy Collecting scrapy Using cached Scrapy-1.4.0-py2.py3-none…

#11/20 Sorting: Comparator [Cracking the Coding Interview Challenges]

#11 Sorting: Comparator www.hackerrank.com solution python3 での解答。 from functools import cmp_to_key class Player: def __init__(self, name, score): self.name = name self.score = score def comparator(a, b): if a.score > b.score: return -…