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


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

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