标签:遍历 pytho mat nbsp format form for bsp python
a = {"name" : "alex","age":16}
v = "my name is {name}, my age is {age}".format(**a) **字典可以将字典拆分为(name = "alex",age = 16)
如果a是列表的话
a = ["name",16]
v = "my name is {},my age is {}".format(*a) *可以将列表遍历为("name","16")
标签:遍历 pytho mat nbsp format form for bsp python
原文地址:https://www.cnblogs.com/ch2020/p/12337078.html