Level 1 : What will be the output of the following code?


i=1
while i < 4:
  print(i, end =' ')
  i++
  print(i+1, end=' ')

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