Level 3 : What will be the output of the following Python code? print("Hello {1} and {0}".format('bin', 'foo'))

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