- python是一只蟒蛇的意思
在python里,变量也是一个对象,也能调用del把它释放掉
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15# -*- coding: cp936 -*-
#hanshu
def registerUser(username='lll',password='00'):
#提示用户
username=raw_input("please input name中文啊 啊 ")
if(len(username)>3 and len ( username)< 20):
password=raw_input("please enter psw")
if(password.isdigit()):
print "恭喜"+username+password
else:
print '失败'+username+password
else:
print '长度不对'+username+password
registerUser()函数调用问题
1 | def a(x): |
调用a(1)返回
调用a(1)(2)返回3