Level 10 : what is the output of the following code?


dz = 1
while dz < 3: 
  	print(dz)
        dz += 1

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