String in specific format

joeSwan :

how can I check in python if string is in correct format?
I have variable tag, and it should be in fomrat 0.0

e.g

tag = "1.0"

if tag != (is not in format **0.0**):
    print("not in tag")"
else:
    print("correct tag")"

In bash it looks like this

tag="10.0"
if [[ $tag != "${tag%.*}.${tag#*.}" ]]; then
    echo "wrong tag"
fi