vars()函数是返回给出参数所有成员,以字典的方式返回。例子如下:
# File: builtin-vars-example-1.py
book = "library2"
pages = 250
scripts = 350
print("the %(book)s book contains more than %(scripts)s scripts" % vars())
结果输出如下:
the library2 book contains more than 350 scripts>>>
在这里可以看到%(book)是从vars()返回的字典里获取参数,后面的%(scripts)同理。
Python游戏开发入门
http://edu.csdn.net/course/detail/5690
你也能动手修改C编译器
http://edu.csdn.net/course/detail/5582
纸牌游戏开发
http://edu.csdn.net/course/detail/5538
五子棋游戏开发
http://edu.csdn.net/course/detail/5487RPG游戏从入门到精通http://edu.csdn.net/course/detail/5246WiX安装工具的使用http://edu.csdn.net/course/detail/5207俄罗斯方块游戏开发http://edu.csdn.net/course/detail/5110boost库入门基础http://edu.csdn.net/course/detail/5029Arduino入门基础http://edu.csdn.net/course/detail/4931Unity5.x游戏基础入门http://edu.csdn.net/course/detail/4810TensorFlow API攻略http://edu.csdn.net/course/detail/4495TensorFlow入门基本教程http://edu.csdn.net/course/detail/4369C++标准模板库从入门到精通 http://edu.csdn.net/course/detail/3324跟老菜鸟学C++http://edu.csdn.net/course/detail/2901跟老菜鸟学pythonhttp://edu.csdn.net/course/detail/2592在VC2015里学会使用tinyxml库http://edu.csdn.net/course/detail/2590在Windows下SVN的版本管理与实战 http://edu.csdn.net/course/detail/2579Visual Studio 2015开发C++程序的基本使用 http://edu.csdn.net/course/detail/2570在VC2015里使用protobuf协议http://edu.csdn.net/course/detail/2582在VC2015里学会使用MySQL数据库http://edu.csdn.net/course/detail/2672
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有