Level 1 : What will be the output of this program?


a = '1 2'  
print(a * 2)  
print(a * 0)  
print(a * -2)

Author: HareramG | Tags: logical-operator | 1736+ Python FAQs | Share
multithreading | bitwise-operator | descriptors | bitwise-operator | error | factorial-function | context-manager | application | immutable-data-type | regex | decorator | random-function | dictionary | encoding | overflow | statement | lambdas | python_version | string-manipulation | operators | input | postfix | identifier | typeerror | sorting | lists | matrix | min-max-function | head-and-tail | raise | expand-tab | boolean-and-non-boolean | __all__-attribute | string-slicing | set | escape-operator | match | global-variable | pickling-&-unpickling | comprehension | precedence-and-associativity | update | counter | tuple-unpacking | operations | operand | installation | global-variable | zip-function | design-principle | access-modifier | mathematics | memory | multiprocessing | compute | zfill-function | zip | iterable | sys | static-method | immutability | identity-operator | string-method | error-handling | fabs-function | virtual-environment | id-function | shallow-copy | formal-and-actual-parameter | benefit | command-line-parsing | range | list-indexing | else-statement | swapping | list-mutation | logical-operator | assignment-operator | complex-number | inheritance | generators | invalid-list | choice | list-comprehension | operator-or | syntax-error | functions | while-and-for-loop | expression | feature | list | recurssion | copy | loops | class | scientific-notation | library | max-min | attribute | syntaxerror | filter-function | datatype | file_handling | yield | data-structure | version | string-slicing | round-function | filter | encapsulation | control-flow | basic | operator-overloading | class-and-object | thread | version-check | loop | slicing | turtle | map-function | assert | python-repl | mysql | arithmetic-expression | identity-operator | math | python | datetime | matplotlib | generator | list-operation | object-attribute | threading | exception-handling | variable | file-handling | exception-handling | classes | string-iteration | int | asyncio | implementation | package-management | precedence | higher-order-function | comment | import-method | polymorphism | goto-function | __init_subclass__ | bitwise | sum() | counter-function | sum-function | numeric | debugging | memory-management | objects | return-statement | built-in | recursion | python-django | data-structure | string-formatting | mutable | while-else-loop | conversion | loop-control | data-type | async | functional-programming | oops | built-in-function | floating-point-precision | math-copysign | print-statement | decimal | type-conversion | name-mangling | gil | enumerate() | oop | syntax-error | function-argument | tuple | boolean | indexing | built-in-function | rollback | syntax | complex | dictionaries | operator-and | namedtuple | binary | slice | conditional-statement | file | join | class-and-instance-variable | mapping-function | function | pandas | frozenset | arithmetic-operation | type-conversion | sys-module | set-operation | list-join | comparison | multiple-inheritance | input-function | list-method | indentation | inherit | type_conversion | stack | module | lambda-function | __future__ | global-keyword | constructor | binary-operation | matrix-list-comprehension | magic-method | collections | sorted | round | keyword | array | software-design | staticmethod | control-statement | parameter | mathematical-function | data-type | condition | exception | string-formatting | call | generators-in-python | function-and-scope | global | input-function | pseudocode | touples | string-method | data_structure | conditional-statement | virtual-environment | init | list-comprehension | lambda | dicts | asyncio-module | class-and-inheritance | with-statement | list-vs-tuple | python-history | methods | logical-operator | random | odd-number | integer | print | docstring | default-mutable-argument | min-function | def | destructor | string-concatenation | collection | iterator | method | deep-copy | split | format | list-slicing | file-handling | exponentiation | data-structures | control-flow | for | append | pep | logical-operation | regular-expression | python-module | string | namespace | nested-loop | heap-memory | operator | interpreter | numpy | center | while-loop ...