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