結果 : how to check if a string is in a certain format python