标签:为什么 bim strong name 接收 vnc utf-8 return col
import time def test(): print(‘this is test func‘) def deco(func): print(‘this is deco‘) func() #test() return func deco(test) res = deco(test) print(res)
def test(): def deco(): print(‘this is test‘) deco() res = test() print(res)
def deco(func): #func=test def wrapper(): func() #test() print(‘this is add‘) return wrapper #返回wrapper的内存地址 (两个动作 1、是定义函数 2、返回值) @deco (装饰器) #test= deco(test) wrapper的内存地址 def test(): print(‘this is test func‘) test()
def deco(func): #func=test def wrapper(*args,**kwargs): func(*args,**kwargs) #test()函数 print(‘this is add‘) return wrapper #返回wrapper的内存地址 @deco (装饰器) def test(name,age,job): print(‘this is test func %s qwe %s %s‘ %(name,age,job)) test(‘aaa‘,18,‘IT‘)
s = ‘helloword‘ i = 0 while i < len(s): print(s[i]) i = i+1
i = 0 l = [‘a‘,‘b‘,‘c‘,‘d‘] # l = (‘a‘,‘b‘,‘c‘,‘d‘) while i < len(l): print(l[i]) i = i+1
res = d_items.__next__() res1 = d_items.__next__() res2 = d_items.__next__() print(res) print(res1) print(res2) #按顺序取值
while True: try: res = d_items.__next__() print(res) except StopIteration: #报错跳出 break
i = 0 d = {‘name‘:‘asdf‘,‘age‘:12,‘job‘:‘it‘} for i in d: print(i)
标签:为什么 bim strong name 接收 vnc utf-8 return col
原文地址:https://www.cnblogs.com/heiguu/p/10048640.html