Level 5 : Select correct Output of the following code


str1 = "My salary is 7000";
str2 = "7000"

print(str1.isdigit())
print(str2.isdigit())

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