Level 1 : what is the output of the following code?


str='datazeneral'
str.ljust(15, '-')

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