Level 1 : What will be the output of the following code?


a = ~4
b = a + 4
print (b)

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