Python Pattern Match Array Function Google