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