
Python语言
雁塔菜农
俺是农民俺怕谁???
展开
-
菜农Python菜鸟第1天学习笔记之print,def,for,while
#! -*- coding:utf-8 -*- #菜农HotPower@163.com 2019.4.8 于西安雁塔菜地 def func(x,*y): print("type=%s,x=%d"%(type(x),x)) for i in range(len(y)): print("type={0},y[{1}]={2}".format(type(y[i]),i,...原创 2019-04-09 21:00:06 · 286 阅读 · 0 评论 -
菜农Python菜鸟学习笔记之def,print,for,while,str.format
#! -*- coding:utf-8 -*- #菜农HotPower@163.com 2019.4.8 于西安雁塔菜地 def func(x,*y): print("type=%s,x=%d"%(type(x),x)) for i in range(len(y)): print("type={0},y[{1}]={2}".format(type(y[i]),i,...原创 2019-04-08 15:29:18 · 553 阅读 · 0 评论 -
菜农Python菜鸟学习笔记之hex,inttohex,str.format
#! -*- coding:utf-8 -*- #菜农HotPower@163.com 2019.4.9 于西安雁塔菜地 def inttohex(v, size): return "{:>0{}X}".format(v,size)[-size:] def hextoint(s): return int(s, 16) i=0x0123456789aBcdeF j=0x12A...原创 2019-04-09 17:19:22 · 785 阅读 · 0 评论 -
菜农Python菜鸟学习笔记之两种16进制转换函数的构建
#! -*- coding:utf-8 -*- def int2hex(v, size):#%无法嵌套 return (("%0" + str(size) + "X") % v)[-size:] def inttohex(v, size):#{}可以嵌套 return "{:>0{}X}".format(v,size)[-size:] def hextoint(s): ...原创 2019-04-09 20:56:36 · 317 阅读 · 0 评论 -
菜农Python菜鸟学习笔记lambda学习
#! -*- coding:utf-8 -*- #Python菜鸟lambda学习 #菜农HotPower@163.com 2019.4.16 filter_me = [1, 2, 3, 4, 6, 7, 8, 11, 12, 14, 15, 19, 22] result = filter(lambda x: x % 2 == 0, filter_me) res = filter(lambda ...原创 2019-04-17 15:01:52 · 465 阅读 · 0 评论 -
菜农Python菜鸟学习笔记class学习
#! -*- coding:utf-8 -*- #Python菜鸟类学习 #菜农HotPower@163.com 2019.4.16 class HotCRC(object): def __init__(self): self.polystr = "CRC16L_1021_FFFF_0000" self.polynomial = "CRC16=X16+X1...原创 2019-04-17 15:05:31 · 469 阅读 · 0 评论 -
菜农Python菜鸟学习笔记Tkinter之Label,Entry,Button学习
# -*- coding: UTF-8 -*- #Python菜鸟Tkinter学习Label,Entry,Button笔记 #菜农HotPower@163.com 2019.4.15于西安雁塔菜地 from tkinter import * def BtnCommand(): if btnstr.get() == "命令": btnstr.set("退出") ...原创 2019-04-15 11:41:28 · 684 阅读 · 0 评论