![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python学习
不再犹豫just do it
慢慢成长ing~
展开
-
归并排序python实现
python实现归并排序并生成长度为200000的随机数组测试运行时间 import random import time def merge(a, b): c = [] h = j = 0 while j < len(a) and h < len(b): if a[j] < b[h]: c.append(a[j]) j += 1 else: c.appen.原创 2021-10-10 16:31:03 · 111 阅读 · 0 评论 -
input 函数的功能和用法
接受一个标准输入数据,返回为string类型 在命令行输入一行信息,会将这行信息返回成字符串 result = input("请输入你的名字:") print(result) name = input('你的名字是:') birthday = input('你的生日是:') like_animal = input('你喜欢的小动物是:') like_fruit = input('你喜欢的水果是:') like_sport = input('你喜欢的运动是:') print('你的名字叫: %s,原创 2021-10-03 21:37:59 · 1872 阅读 · 0 评论