w10schools
Login Register
  • Home
  • Tutorials
    • HTML, CSS
      • HTML, HTML5
      • CSS, CSS3
    • XML
    • JavaScript, AJAX
    • PHP
    • Ruby on Rails
      • Ruby
      • Rails
    • ASP.NET
      • ASP
      • C# .NET
    • Java
      • JSP
    • Databases
      • MySQL
      • MSSQL Server
      • Oracle
    • Web Server
      • Windows
      • Linux
      • Apache
      • IIS
    • Design
      • Dreamweaver
      • Flash
      • Photoshop
      • Fireworks
      • CorelDRAW
      • Illustrator
  • References
    • HTML
      • Bootstrap
    • CSS
      • CSS Selectors
      • Sass
    • JavaScript
    • Mobile Apps
      • Cordova
    • Ruby on Rails
      • Ruby
      • Rails
    • PHP
      • Function
      • Language
      • CodeIgniter
      • Phalcon
      • PHPUnit
      • Symfony
      • Drupal
      • Yii
      • Laravel
    • Perl
      • Perl
    • Python
      • Python
      • Django
      • NumPy
      • Pandas
      • scikit-image
      • scikit-learn
      • Statsmodels
      • Matplotlib
    • Lua
      • Lua
    • C, C++
      • C
      • C++
    • Server
      • Docker
      • Apache HTTP Server
      • Nginx
    • Database
      • PostgreSQL
    • Big Data
      • TensorFlow
    • Game Development
      • Phaser
      • LÖVE
  • Articles
    • News
    • General
      • Website Promotion
      • Online Advertising
      • Make Money Online
    • Editorials
    • Interviews
    • Web Roundups
  • Resources
    • Design
      • Fonts
      • Graphics
      • Vectors
      • Templates
      • UI (User Interface)
      • Brushes
      • Patterns, Backgrounds
      • Textures
    • Web Development
      • HTML, CSS
      • XML
      • JavaScript, AJAX
      • Ruby on Rails
      • PHP
      • Java
      • .NET
      • Python
      • Perl
      • Flash
    • Mobile Application Development
      • Mobile Development Tools
      • Swift
    • Online Services
      • Online Storage
      • Web Hosting
  • Tools
    • Generators
Edit
In Place Editing Advanced Editing
  • References
  • Python
  • Python
  • Text Processing

string.Formatter.format()

format(format_string, *args, **kwargs)

The primary API method. It takes a format string and an arbitrary set of positional and keyword arguments. It is just a wrapper that calls vformat().

Deprecated since version 3.5: Passing a format string as keyword argument format_string has been deprecated.

Links:
  • https://docs.python.org/3.5/library/string.html#string.Formatter.format
doc_python
doc_python
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.

Popular Articles
string.Formatter.format_field() format_field(value, format_spec) format_field() simply calls the global format() built-in. The method is provided so that subclasses can override
string.Formatter class string.Formatter The Formatter class has the following public methods: format(format_string, *args, **kwargs) The primary API method. It
logging.Formatter.format() format(record) The record’s attribute dictionary is used as the operand to a string formatting operation. Returns the resulting string. Before for
i18n\Formatter format() format() public method Formats the value based on the given format type. This method will call one of the "as" methods available in this class to
string.Formatter.parse() parse(format_string) Loop over the format_string and return an iterable of tuples (literal_text, field_name, format_spec, conversion). This is use


Return to View
  • Facebook
  • Tweet
  • Digg it
  • Stumbleupon
  • Delicious
  • Plus Share

Designed by : w10schools

service@w10schools.com

Our Partners: aeeble – Providing content publishing and search solutions