Python 字典

 

 

 

 

遍历字典:

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)

 

posted @ 2020-02-28 17:54  古兴越  阅读(131)  评论(0编辑  收藏  举报