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