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


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

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