Level 1 : What is the output of the following program?


import threading 
  
class thread(threading.Thread): 
    def __init__(self, thread_ID): 
        self.thread_ID = thread_ID 
    def run(self): 
        print(self.thread_ID) 
          
thread1 = thread(100) 
  
thread1.start()

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