官术网_书友最值得收藏!

The sort function

Finally, let's have a built-in sort function that you can use:

z = [3, 2, 1]
z.sort()
z

So if I start with list z, which is 3,2, and 1, I can call sort on that list, and z will now be sorted in order. The output of the above code is as follows:

[1, 2, 3]
主站蜘蛛池模板: 鸡东县| 沅江市| 平顺县| 精河县| 隆回县| 林芝县| 西林县| 阿坝| 中牟县| 山西省| 太原市| 卓资县| 丁青县| 乐安县| 普宁市| 旬阳县| 安达市| 珠海市| 修武县| 永吉县| 高要市| 武夷山市| 锦屏县| 常州市| 泰来县| 依安县| 巴里| 临沧市| 西安市| 沐川县| 义马市| 土默特右旗| 类乌齐县| 城口县| 政和县| 延安市| 奉新县| 卫辉市| 英超| 阆中市| 桦南县|