python通过apply使用元祖和列表调用函数实例
作者:疯狂一夏 时间:2021-02-18 03:18:32
本文实例讲述了python通过apply使用元祖和列表调用函数的方法。分享给大家供大家参考。具体实现方法如下:
def my_fuc(a, b):
print a, b
atuple=(30,10)
alist= ['Hello','World!']
apply(my_fuc,atuple)
apply(my_fuc,alist)
运行结果如下:
30 10
Hello World!
希望本文所述对大家的Python程序设计有所帮助。
标签:python,apply,元祖,列表
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
[翻译]标记语言和样式手册 Chapter 12 CSS布局
2008-02-13 14:19:00
![](https://img.aspxhome.com/file/UploadPic/20082/13/2008213144620374s.jpg)
微信小程序实现图片轮播及文件上传
2023-09-05 00:12:52
asp如何将数字转化成条形图?
2009-12-03 20:19:00
XMLHTTP资料
2008-09-05 17:20:00
python实现爬虫统计学校BBS男女比例之多线程爬虫(二)
2021-05-10 03:08:18
python实现图片,视频人脸识别(dlib版)
2023-03-28 14:35:19
python3使用print打印带颜色的字符串代码实例
2022-01-20 10:30:49
python中 @的含义以及基本使用方法
2022-12-24 04:58:48
Python中三种花式打印的示例详解
2022-06-27 06:51:11
Python字符串类型及格式化问题
2023-12-30 21:49:46
用VB编写ActiveX DLL实现ASP编程
2008-10-21 21:28:00
python 对xml解析的示例
2023-05-30 23:06:31
![](https://img.aspxhome.com/file/2023/8/97418_0s.jpg)
PHP实现统计代码行数小工具
2023-11-15 18:53:20
PHP implode()函数用法讲解
2023-06-19 22:54:34
![](https://img.aspxhome.com/file/2023/1/55381_0s.png)
基于Python3编写一个GUI翻译器
2022-07-07 07:57:54
![](https://img.aspxhome.com/file/2023/7/80637_0s.gif)
python构造函数init实例方法解析
2022-09-30 15:09:19
![](https://img.aspxhome.com/file/2023/2/103612_0s.png)
python 基于opencv 实现一个鼠标绘图小程序
2021-06-20 18:13:05
![](https://img.aspxhome.com/file/2023/7/84087_0s.png)
Mysql数据库常用命令
2009-03-06 14:29:00
如何使用ADO.NET连接数据库?
2010-06-03 10:52:00
基于Opencv图像识别实现答题卡识别示例详解
2023-05-18 20:32:50
![](https://img.aspxhome.com/file/2023/8/82538_0s.jpg)