Level 9 : What will be the output of the following Python code?


a=[(6,2),(5,4),(7,9)]
a.sort()
a

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