本文实例讲述了Python映射拆分操作符用法。分享给大家供大家参考。具体如下:
1
2
3
4
|
name = "jack"
age = 24
s = "name is {name} and age is {age}" . format ( * * locals ())
print s
|
运行结果如下:
name is jack and age is 24
希望本文所述对大家的Python程序设计有所帮助。