As suggested by user2390182, you can use Regex(Regular Expressions) for solving this problem.
Adding to it, more straightforward regex will be as follows:
import re
def Extract_Numbers(Str): return re.findall('(-*[0-9]+)', Str)
print(Extract_Numbers("hi6 my name is-34 have you seen96?")) # ['6', '-34', '96']
You can also put the import statement inside the function to make it usable across your projects....
def Extract_Numbers(Str):
import re
return re.findall('(-*[0-9]+)', Str)
print(Extract_Numbers("hi6 my name is-34 have you seen96?")) # ['6', '-34', '96']