摘要:
11-25 阅读全文
摘要:
unsigned char code table[]= {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; void delay(unsigned int Ms) { unsigned int k; unsigned char i, j; for 阅读全文
摘要:
带key的内置函数: min,max, filter,map,sorted 都有key参数,都可以和lambda合作 阅读全文
摘要:
# 几个重要的内置函数 # 1 zip l = [1,2,3,4] l2 = ['a','b','c'] for i in zip(l,l2): print(i) # 2 filter:只筛选不改变原来的值 def is_odd(num): return num % 2 == 1 ret = filter(is_odd,[1,2,3,4,5,6,7,8,9]) print(... 阅读全文
摘要:
print(format('text','<40')) 阅读全文
摘要:
数据类型:int,bool 数据结构:dict,list,tuple,set,str 阅读全文
摘要:
# 复习内置函数 print input len type open tuple list dir id help range next iter eval exec # 执行字符串中的文字 # 不同:exec没有返回值,切断返回值,中间流程 # eval 不安全,适用有返回值的简单计算 # 特别:字符串中文字有交互如input,使用compile(code,single) compil... 阅读全文
摘要:
生成器只要取一次就没了,g取完了,g1就没了,g2也没了 g1取完了,g2也没了 注意:数值分别和列表相加是列表 阅读全文