oldboy_09_03day_test1

#!/usr/bin/env python
#encoding:utf-8
'''
def test1(*arg2):

#print arg2.keys()
#print arg2.values()
print arg2

a={'b':2,'c':3}

print a.keys()
print a.values()

test1('k1','k2')

print type(a)

s='abc'

print type(s)

s=u'abc'
print type(s)
s=s.encode('utf-8')
print type(s)'''
'''
a=input('please input number a:')
b=input('please input number b:')

f=1 if a==b else 2 #三元运算
''如果a=b 则f=1 否则f=2''
print f
c=lambda x,y,z:(x+y)*z

print c(1,2,3)


def yields(a,b):
print 'a'
yield a
'' 迭代器 中途运行完,下次继续上次的运行结果''
print 'b'


a=yields(1, 2)
print a.next()
print '中断'
print a.next()


u=[]
import random
u1=chr(random.randint(80,199))

u2=random.randrange(1,60)
u3=chr(random.randint(97, 122))
'生成随机验证码'

for i in u1,u2,u3:
u.append(i)

print u


import md5
c=md5.new()
c.update('Lkdfnq90945@')
print c.hexdigest()
'''

原文地址:https://www.cnblogs.com/zhzhao/p/4526870.html