Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

append to lists python

 list = [1, 2, 3]
  print list.append(4)   ## NO, does not work, append() returns None
  ## Correct pattern:
  list.append(4)
  print list  ## [1, 2, 3, 4]
Source by developers.google.com #
 
PREVIOUS NEXT
Tagged: #append #lists #python
ADD COMMENT
Topic
Name
9+7 =