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


str='Coffee';
print(str.zfill(10))

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