摘要: 一、数字 1. int 整型 在32位机器上,整数的位数为32位,取值范围为-2**31~2**31-1,即-2147483648~2147483647 在64位系统上,整数的位数为64位,取值范围为-2**63~2**63-1,即-9223372036854775808~9223372036854775807 2.... 阅读原文
2018-06-26 00:20:02 阅读(1404) 评论(0)
摘要: 一、参考解法: import time print('当前时间戳:',time.time()) #当前时间戳: 1529908783.3990765 print('获取当前本地时间:',time.localtime()) #获取当前本地时间: time.struct_time(tm_year=20... 阅读原文
2018-06-26 00:00:02 阅读(1392) 评论(0)
摘要: 现在进入你还是先行者,最后观望者进场才是韭菜。 背景     下面我来带大家看看,黑客是如何实现的! 我们可以看到执行的方法是 batchTransfer 那这个方法是干嘛的呢?(给指定的几个地址,发送相同数量的代币)           uint256 首先 uint256(cnt) 是... 阅读原文
2018-06-25 21:48:04 阅读(1375) 评论(0)
摘要: 一、数字 :int 在python3中所有整型不管数字有多大,它都是int类型   ************int的用法***************** 1.1 将字符串转换成数字 a="1234"print(type(a),a) #type是查看变量的数据类型b=int(a)b=b+1000print(t... 阅读原文
2018-06-25 20:16:02 阅读(873) 评论(0)
摘要: 一、参考解法: score = int(input('输入分数:'))print("A" if score>89 else('B' if score>59 else 'C')) 二、参考解法: while 1:    score = int(input('输入分数:'))    mark = [90,60... 阅读原文
2018-06-25 19:44:01 阅读(1558) 评论(0)
摘要: 字符串内建函数(str) capitalize()案例 #capitalize 首字母大写 s = 'this is dog' print(s) print(id(s)) New_s = s.capitalize() print(New_s) print(id(New_s)) View Code 字符串的相... 阅读原文
2018-06-25 18:07:08 阅读(680) 评论(0)
摘要: filter函数 1 people = ['tanglaoer_sb', 'chenlaosan_sb', 'linlaosi', 'wanglaowu_sb'] 2 res = filter(lambda n:not n.endswith('sb'),people) 3 print(list(res)) map... 阅读原文
2018-06-25 16:19:01 阅读(1419) 评论(0)
摘要: 一、参考解法:while 1:    n = int(input('请输入一个整数:'))    print('%d='%n,end='')    while n>1:        for i in range(2,n+1):            if n%i==0:                n=in... 阅读原文
2018-06-25 15:49:02 阅读(1476) 评论(0)
摘要: # 单行注释 ''' 多行注释 ''' """ 这个也是多行注释 """ ''' 声明变量 Python 中的变量不需要声明。每个变量在使用前都必须赋值,变量赋值以后该变量才会被创建。 在 Python 中,变量就是变量,它没有类型,我们所说的"类型"是变量所指的内存中对象的类型。 ''' ss="Hello... 阅读原文
2018-06-25 15:14:02 阅读(1316) 评论(0)
摘要:   客户端代码,监听端口号为 localhost 9999 #!/usr/local/bin/python3 # -*- coding:utf-8 -*- import socket client = socket.socket() client.connect(('localhost', 9999)) wh... 阅读原文
2018-06-25 14:00:04 阅读(1561) 评论(0)