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


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

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