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