I'm trying to find the word that includes strings and numbers both at the same time. I tried to do something like:
string = "bear666 got sentenced 70 years in prison"
values = string.split()
for i in values:
if i.isalpha() and i.isdigit():
print(i)
but nothing worked. Help would be much appreciated
I'm trying to get beaar666 as an output.