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