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


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

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