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