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