only python script to disp results in both text and JSON format needed

"python script to disp results in both text and JSON format"