Level 9 : What will be the output of the following Python function (random module has already been imported)?


random.choice('sun')

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