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