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