Jan-14-2017, 06:01 PM
extend changes the list in place (and thus return None)
>>> f = [].extend(['spam', 32, 44]) >>> type(f) <type 'NoneType'> >>> f=[] >>> f.extend(['spam', 32, 4]) >>> type(f) <type 'list'> >>> print f ['spam', 32, 4]