1 Star 0 Fork 0

Lxxyx/Python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Day18 命名,变量,代码和函数.py 575 Bytes
一键复制 编辑 原始数据 按行查看 历史
Lxxyx 提交于 2015-07-20 15:22 . 第一次Git
# -*- coding: utf-8 -*-
__author__ = 'Liu'
# *args的作用是把所有参数都接收进来,放倒叫args的列表里,一般不怎么用
def print_two(*args):
arg1, arg2 = args
print("arg1:%r,arg2:%r" % (arg1, arg2))
# 所以说,这个有没有*args都可以运行,接收藏书而已。
def print_two_again(arg1, arg2):
print("arg1:%r,arg2:%r" % (arg1, arg2))
def print_one(arg1):
print("arg1:%r" % arg1)
def print_none():
print("I got nothing")
print_two("刘", "天刘")
print_two_again("Liu", "Liu2")
print_one("Lxxyx")
print_none()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/lxxyx/Python.git
git@gitee.com:lxxyx/Python.git
lxxyx
Python
Python
master

搜索帮助