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