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


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

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