20.Selenium2 自动化测试实战-基于Python语言-函数

来源:互联网 发布:什么翻译软件最准确 编辑:程序博客网 时间:2024/05/04 13:40
python中通过def关键字来定义函数。
Python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 15:51:26) [MSC v.1900 32 bit (Intel)] on win32Type "copyright", "credits" or "license()" for more information.>>> def add(a,b):print(a+b)>>> add(5,5)10>>> def add(a,b):return a+b>>> add(6,6)12>>> def add(a=1,b=2):return a+b>>> add()3>>> add(5,5)10>>> 

0 0
原创粉丝点击