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