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