Level 9 : How will you remove all leading whitespace in string?


Variable =  'Pyrhon    '

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