1 Star 0 Fork 0

野哥(沐野)/first_python_learn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
func_20230803.py 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
Admin 提交于 2023-08-03 23:12 . '函数
# def functionname():
# "函数_文档字符串"
# function_suite
# return [expression]
# def printme(str):
# print(str)
# return
# printme('wo xi huan ke er')
# printme('wo shi zhen de xi huan ke er')
# def ChangeInt(a):
# print(a ,'------------')
# a = 10
# print(a , '++++++++')
# b = 5
# ChangeInt(b)
# print(b)
# def changeme(mylist):
# mylist.append([1,2,3,4])
# print('函数内取值:',mylist)
# return
# mylist = [10,20,30,40]
# print(mylist,'------------')
# changeme(mylist)
# print(mylist,'++++++++++')
# def printme(str):
# print(str)
# return
# printme()
# def printme(str):
# print(str)
# return
# printme(str = "My string")
# def printinfo(name, age):
# print("Name:",name)
# print("Age",age)
# return
# printinfo(age=18,name="keer")
# def printinfo(name, age = 18):
# print("Name:",name)
# print("Age",age)
# return
# printinfo(name="keer")
# def printinfo(age = 18,name):
# print("Name:",name)
# print("Age",age)
# return
# printinfo(name="keer")
def printinfo(arg1,*vartuple):
print("输出:")
print(arg1)
for var in vartuple:
print(var,"--------")
return
printinfo(70,60,50)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/ye-ge-mu-ye/first_python_learn.git
git@gitee.com:ye-ge-mu-ye/first_python_learn.git
ye-ge-mu-ye
first_python_learn
first_python_learn
master

搜索帮助