Checking whether a string starts with XXXX
RanRag has already answered it for your specific question.
However, more generally, what you are doing with
if [[ "$string" =~ ^hello ]]
is a regex match. To do the same in Python, you would do:
import reif re.match(r'^hello', somestring): # do stuff
Obviously, in this case,
somestring.startswith('hello') is better.