Level 1 : What is the output of the following code?


print('*', 'abcedf'.center(6), '*')

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