Level 1 : What will be the datatype of the var in the below code snippet?


var = 10
print(type(var))
var = "Hello"
print(type(var))

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