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