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