while后面的条件还可以是正则表达式的对象吗?

str='394jshd8923jkshd9lkkk890k'
re_str=r'\d+'
result=re.search(re_str,str)
print(result)
while result :
    print(result)
    str= str[result.end():]
    result=re.search(re_str,str)

上面是我的代码,然后result的结果应该是正则表达式所对应的对象吧,while后面居然还可以这样写吗,有没有大神帮帮忙

while 的条件可以是任意值

while后面的条件表达式,可以是任何表达式,任何非零、或非空(null)的值均为true