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