标签:des style blog http 2014 for
Python provides methods that operate on lists. For example, append adds a new element to the end of a list, extend takes a list as an argument and appends all of the elements:
And this example leaves t1 unmodified.
sort arranges the elements of the list from low to high:
List methods are all void; they modify the list and return None. If you accidentally write t = t.sort(), you wiil be disappointed with the result.
from Thinking in Python
标签:des style blog http 2014 for
原文地址:http://www.cnblogs.com/ryansunyu/p/3841119.html