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