摘要: 字段名或者是一个与某个str.format()方法对应的参数,或者是方法的某个关键字参数的名称。>>>"{who} turned {age} this year".format(who = "She",age = 88) // 分别使用了关键字参数,who和age 'She turned 88 this year'>>>"The {who} was {0} last week".format(12,who = "boy") //使用了一个位置参数与一个关键字参数, 阅读全文
posted @ 2012-04-02 23:00 木头lbj 阅读(591) 评论(2) 推荐(1) 编辑