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


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

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