Source: http://www.liaoxuefeng.com/ ♥ Function In python, name of a function could be assigned to a variable, for example: >>> a = abs; >>> a(-12) 12 function definition: def funtion_name(input_variable): function body return variables #…
From this blog I will turn to Markdown for original writing. Source: http://www.liaoxuefeng.com/ ♥ list a list could be accessed using positive number (start from 0) in sequence or negative number in reverse sequence. Note that square brackets should…
Source: http://www.liaoxuefeng.com/ ❤ Escape character: '\' - '\n': newline; - '\t': tab; - '\\': \; - r'...': no transferring for contents within single quotes; - '''...''': multiple lines within triple quotes: could start a new line with ENTER dire…
Source: http://www.liaoxuefeng.com/ ♥ Slice Obtaining elements within required range from list or tuple (The results remain the same type as the original one.). >>> L = list(range(100)) >>> L [0, 1, 2, ..., 99] >>> L[:3] # Acces…
See also: Scrapy homepage, Official documentation, Scrapy snippets on Snipplr Getting started If you're new to Scrapy, start by reading Scrapy at a glance. Google Summer of Code GSoC 2015 GSoC 2014 Articles & blog posts These are guides contributed b…