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


def fun():
    for x in range(22,23,24):
    print(x)
fun()

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