Level 1 : What will be the output of the following Python code?


'{0:f}, {1:2f}, {2:05.2f}'.format(1.23456, 1.23456, 1.23456)

Author: KaivalyaG | Tags: format | 1859+ Python FAQs | Share
exception-handling | data-type-conversions | exception | collections | built-in | error | class-and-instance-variable | comparison | enumerate() | feature | __all__-attribute | global-variable | arithmetic-operation | global-variable | bitwise-operator | single-inheritance | comment | counter | multiple-inheritance | global-keyword | mathematics | conversion | polymorphism | default-mutable-argument | python-syntax-and-structure | package-management | odd-number | multiple-inheritance | python | filtering-and-indexing | magic-method | pickling--unpickling | recursion | pandas | formal-and-actual-parameter | error-handling | mutable | filter-function | string-concatenation | membership-operators-(in,-not-in) | using-else-and-finally | namedtuple | type-conversion | generators | encoding | operator-overloading | formatting-with-strftime | data-type | logical-operator | random | pass | reading-and-writing-large-files-efficiently | python_version | async | sorting | memory | advanced-file-operations | recurssion | nested-loop | binary-operation | assignment-operator | syntax-error | call | asyncio | operand | counter-function | working-with-binary-files-(rb,-wb) | frozenset | matplotlib | gil | encapsulation | using-yield-in-functions | else-statement | logical-operators | mathematical-function | functions | tuple-unpacking | integers | variable | tuple | shallow-copy | filter | heap-memory | dataframe-and-series-objects | exponentiation | type-conversion | head-and-tail | expression | sorted | namespace | installation | strings | raise | matrix | string-method | intering | max-min | working-with-file-paths | expand-tab | file_handling | global | list-join | input | floats | list-indexing | list-operation | list-mutation | indexing | else | keyword | immutability | higher-order-function | functional-programming | writing:-write(),-writelines() | version | multithreading | function-and-scope | raise-statement | identity-operators-(is,-is-not) | list-methods-and-slicing | walking-through-directories-using-os.walk() | using-map()-for-transformations | list-comprehension | library | implementation | docstring | generators-in-python | numpy | goto-function | using-the-threading-module | for | inherit | while-and-for-loop | test-discovery | python-operators | fabs-function | python-history | threading | min-function | escape-operator | using-join()-and-is_alive()-methods | error-handling | sys | join | generator | string | thread | multiprocessing | turtle | precedence | import-method | zip | floating-point-precision | methods | input-function | function | function-argument | immutable-data-type | exception-handling | version-check | functional-programming | introduction-to-multiprocessing | list-vs-tuple | key-value-pairs | string-iteration | module | set | slice | directory-operations | lambda-function | file | iterator | touples | handling-missing-values-(fillna,-dropna) | thread-safe-data-structures-(queue.queue) | loops | memory-management | reading:-read(),-readline(),-readlines() | set-operation | factorial-function | list-slicing | format | zfill-function | python-module | oop | file-handling | operator | iterators | unit-testing | update | reading-and-writing-files | math-copysign | thread-synchronization | identity-operator | regular-expression | min-max-function | regex | lambdas | invalid-list | input-function | lambda | indentation | application | mysql | scientific-notation | indexing:-loc-vs-iloc | built-in-function | init | static-method | conditional-statement | creating-custom-modules | working-with-dates-and-times | class-and-inheritance | datatype | interpreter | center | dictionaries | destructor | string-slicing | identifier | while-loops | descriptors | type-conversion-and-casting | print | arbitrary-arguments-(*args,-**kwargs) | creating-and-starting-threads | tuples | introduction-to-python | mapping-function | loop-control | virtual-environment | tuple-methods | syntax | identity-operator | multiple-except-blocks | typeerror | integer | iterable | match | postfix | lambda-functions | assignment-operators | math | logical-operator | list | comprehension | constructor | inheritance | stack | sets | dictionary-comprehensions | boolean-masking | split | sys-module | method | syntaxerror | why-use-multiprocessing-over-threading?-(gil) | context-manager | list,-set,-and-dictionary-comprehensions | assert | object-attribute | id-function | joining-and-merging-dataframes | pep | list-method | with-statement | objects | list-comprehensions | boolean | int | classes | file-handling | method-overloading | using-assertions-(assertequal,-assertraises) | introduction-to-threads | benefit | operators | boolean-and-non-boolean | managing-directories-with-os-and-shutil | numeric | loop-control-statements | compute | debugging | class | decimal | rollback | type_conversion | using-lists-as-stacks | string-slicing | slicing | precedence-and-associativity | control-statement | basic | aggregating-data-with-functools.reduce() | conditional-statements | class-decorators | default-arguments | logical-operation | loop | dictionary | literal-characters-and-special-characters | yield | time-series-with-pandas | defining-functions | def | virtual-environment | datetime | working-with-temporary-files-using-tempfile | operator-or | asyncio-module | array | data-structures | conditional-statement | print-statement | operator-and | attribute | opening-files-(open()) | condition | oops | map-function | statement | zip-function | arithmetic-expression | control-flow | name-mangling | staticmethod | datetime.date,-datetime.time,-datetime.datetime | regular-expressions | software-design | copy | complex | matrix-list-comprehension | string-method | pseudocode | dicts | decorator | binary | __future__ | bitwise-operator | while-else-loop | append | __init_subclass__ | using-os-and-pathlib-modules | syntax-error | while-loop | data_structure | collection | class-and-object | list-comprehension | bitwise | data-type | access-modifier | return-statement | data-types | control-flow | lists | deep-copy | dictionary-methods | data-structures-in-python | built-in-modules | choice | built-in-function | sum-function | complex-number | command-line-parsing | overflow | data-structure | round-function | difference-between-threads-and-processes | range | round | python-django | design-principle | parsing-with-strptime | string-methods | sum() | anchors-(^,-$) | booleans | swapping | quantifiers-(*,-+,-?,-{}) | operations | string-manipulation | data-structure | parameter | random-function | python-repl | overriding-methods | sorting-and-ranking | string-formatting | string-formatting ...