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


print("Hello {name1} and {name2}".format(name1='foo', name2='bin'))

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