正则表达式试一下
import re
symbol='$*!# '
symbol='['+symbol+']'
list1=re.split(symbol,input())
list1.reverse()
print(' '.join(list1))