首页 > 编程语言 > 详细

Python 字典

时间:2020-02-28 18:36:16      阅读:57      评论:0      收藏:0      [点我收藏+]

 

 

 

 

遍历字典:

rootDir=./resources/v1/# 根目录

# 按钮测试图片
btnTestPicUrl = {
    armyAttack : rootDir+testPic/gj2.jpg,   # 打野 攻击
    armyPreset : rootDir+testPic/gj2.jpg,   # 打野 预设
    attackMonster : rootDir+testPic/gj3.jpg,# 打野 攻击野怪
    home: rootDir+testPic/xj0.jpg,          # 主页 用于鼠标返回中心点
    xj: rootDir+testPic/xj0.jpg,            # 主页 行军数
    openBoxUse: rootDir+testPic/kx1.jpg,    # 开箱 使用
    openBoxSure: rootDir+testPic/kx2.jpg    # 开箱 确定 
}


# 获取初始位置坐标
for key in btnTestPicUrl:
    name=key
    bigImgUrl=btnTestPicUrl[key]    
    print(name)
    print(bigImgUrl)

 

Python 字典

原文:https://www.cnblogs.com/guxingy/p/12378288.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!