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