美文网首页python学习笔记
python练手_74-列表排序、连接

python练手_74-列表排序、连接

作者: 学子CH | 来源:发表于2019-02-18 11:00 被阅读0次
# -*- coding:utf-8 -*-
# @Author: CH
"""
@project: python study
@time:2019/1/9-19:44
@file_name:【程序74】列表排序、连接.py
@IDE:PyCharm 
@else: DO NOT STOP STUDYING!!!
"""
# 题目 列表排序及连接。
# 程序分析 排序可使用 sort() 方法,连接可以使用 + 号或 extend() 方法。
a=[2,6,8]
b=[7,0,4]
a.extend(b)#连接函数
a.sort()#排序函数
print(a)

相关文章

网友评论

    本文标题:python练手_74-列表排序、连接

    本文链接:https://www.haomeiwen.com/subject/rtzmeqtx.html