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