摘要:
搬家喽 阅读全文
摘要:
引用地址http://www.runoob.com/python/os-file-methods.html 阅读全文
摘要:
56、画图,学用circle画圆形from tkinter import *canvas = Canvas(width=800, height=600, bg='yellow')canvas.pack(expand=YES, fill=BOTH)k = 1j... 阅读全文
摘要:
44、两个 3 行 3 列的矩阵,实现其对应位置的数据相加,并返回一个新矩阵import numpy # pip install numpy 需要安装模块 ,支持大量的维度数组与矩阵运算x = numpy.array([[12, 7, 3], [4, 5... 阅读全文
摘要:
1、列表转换为字典。`s=[1,2]b=['a','b']print (dict([s,b]))`2、#题目:有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?for i in range(1,5): for j in ... 阅读全文
摘要:
11、题目:判断101-200之间有多少个素数,并输出所有素数。#质数只能被1和自己本身整除,也称为素数for i in range(101,201): for k in range(2,i): if i%k==0: ... 阅读全文
摘要:
python中时间日期格式化符号:%y 两位数的年份表示(00-99)%Y 四位数的年份表示(000-9999)%m 月份(01-12)%d 月内中的一天(0-31)%H 24小时制小时数(0-23)%I 12小时制小时数(01-12)%M 分钟数(00=5... 阅读全文
摘要:
集合:可变的数据类型,他里面的元素必须是不可变的数据类型,无序,不重复。 {}'''# set1 = set({1,2,3})# set2 = {1,2,3,[2,3],{'name':'alex'}} # 错的# print(set1)# pri... 阅读全文