zoukankan      html  css  js  c++  java
  • %%的一个应用

     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)
    ##### 愿你一寸一寸地攻城略地,一点一点地焕然一新 #####
  • 相关阅读:
    poj1837 Balance

    字符流
    字节流
    File类
    this和static
    异常
    接口
    抽象类
    多态
  • 原文地址:https://www.cnblogs.com/johnyang/p/10354801.html
Copyright © 2011-2022 走看看