• string.Format


    (C) Currency: . . . . . . . . ($123.00)
    (D) Decimal:. . . . . . . . . -123
    (E) Scientific: . . . . . . . -1.234500E+002
    (F) Fixed point:. . . . . . . -123.45
    (G) General:. . . . . . . . . -123
        (default):. . . . . . . . -123 (default = 'G')
    (N) Number: . . . . . . . . . -123.00
    (P) Percent:. . . . . . . . . -12.60 %
    (R) Round-trip: . . . . . . . -1.5322980781265592
    (X) Hexadecimal:. . . . . . . FFFFFF85


    (d) Short date: . . . . . . . 6/30/2009
    (D) Long date:. . . . . . . . Tuesday, June 30, 2009
    (t) Short time: . . . . . . . 7:14 PM
    (T) Long time:. . . . . . . . 7:14:00 PM
    (f) Full date/short time: . . Tuesday, June 30, 2009 7:14 PM
    (F) Full date/long time:. . . Tuesday, June 30, 2009 7:14:00 PM
    (g) General date/short time:. 6/30/2009 7:14 PM
    (G) General date/long time: . 6/30/2009 7:14:00 PM
        (default):. . . . . . . . 6/30/2009 7:14:00 PM (default = 'G')
    (M) Month:. . . . . . . . . . June 30
    (R) RFC1123:. . . . . . . . . Tue, 30 Jun 2009 19:14:00 GMT
    (s) Sortable: . . . . . . . . 2009-06-30T19:14:00
    (u) Universal sortable: . . . 2009-06-30 19:14:00Z (invariant)
    (U) Universal full: . . . . . Tuesday, June 30, 2009 11:14:00 AM
    (Y) Year: . . . . . . . . . . June, 2009


    (G) General:. . . . . . . . . Green
        (default):. . . . . . . . Green (default = 'G')
    (F) Flags:. . . . . . . . . . Class, Struct
    (D) Decimal number: . . . . . 3
    (X) Hexadecimal:. . . . . . . 00000003

  • 相关阅读:
    Shell脚本 --- 正则表达式和文本处理工具
    python的eval、exec函数
    内置函数 Built-in Functions
    关于Python中的lambda
    Python中*args和**kwargs的区别
    Python基础-10-文件操作
    Python基础-09-内置函数
    Python基础-08-函数
    Python基础-07-集合
    Python基础-06-字典
  • 原文地址:https://www.cnblogs.com/greencolor/p/1579315.html
Copyright © 2020-2023  润新知