Python映射拆分操作符用法实例

1105次阅读  |  发布于6年以前

本文实例讲述了Python映射拆分操作符用法。分享给大家供大家参考。具体如下:


    name="jack"
    age=24
    s="name is {name} and age is {age}".format(**locals())
    print s

运行结果如下:

name is jack and age is 24

希望本文所述对大家的Python程序设计有所帮助。

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8