首页 > 其他 > 详细

%%的一个应用

时间:2019-02-07 14:50:21      阅读:237      评论:0      收藏:0      [点我收藏+]
 1 """
 2 This script illustrate the usage of escape symbol %%. In general, it is used in mutil-formatted string. when a string is
 3 formatted , %% can escape a % so that just one remains for the final formatting operation at the end.
 4 """
 5 a=%s%%s%yjs 
 6 print(a)    # print a as ‘%syjw‘
 7 b=a%jjj   # format variable a again
 8 print(b)    # print b as ‘jjjyjw‘
 9 #******************
10 a=%%s%s%yjw
11 print(a)
12 b=a%jjj
13 print(b)

 

%%的一个应用

原文:https://www.cnblogs.com/johnyang/p/10354801.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!