Level 10 : What is the correct answer for the below logic?


str = "India"
l = len(str)
print(l)

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