Python 101 : Basic formatting


Let's look at some formatting examples:


Below is another example:


We could also do it as follows - {0}: first argument, {1}: second argument -:


Another way, without numbering the arguments:


The below example uses a "float" number:


Using named arguments - "var" in our case - :


Using a "C-like" formatting:

  • %s : String.
  • %d : Decimal notation.

Comments

Popular posts from this blog

Istio 101 : How Istio ServiceEntry relates to Kubernetes Services and Endpoints

Istio 101 : - Loadbalancing, attempts and retries - DestinationRule, VirtualService - -

Istio 101 : - Traffic routing - Virtual services and Destination rules - -