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