06 2020 档案
摘要:#input()函数接收用户输入的值,返回值类型就是字符串类型,set()集合作用就是去掉重复元素,list()将去重之后的字符串对象强转为list对象;str = list(set(input())) #字符串的 set话,然后set 进行list化#调用list集合中的sort()函数,对每一个
阅读全文
摘要:sum = ord('A') //结果为65 sum = chr(65) //结果为A
阅读全文
摘要:mysql workbench create table s(`s#` int, `sname` char(8), `grade` int, primary key(`s#`)); #不知道为什么需要 ``, 居然因为是有了 #, 表示了注释,系统有点蒙 alter table s add addr
阅读全文
摘要:eval内置函数 下面是算法中常见的输入 1 2 3 接受到 a b c 中 a,b,c=input().split() a,b,c=eval(a),eval(b),eval(c) d=b*b-4*a*c print(d) 或者是这样接受 a,b,c=map(int,input().split())
阅读全文