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