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


print('*', "abcde".center(6), '*', sep='')

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