You can combat that in the prompt, I use "just code, no words" which will also remove code comments from output. Bard doesn't respect the same request. You can be more succinct with chatgpt. Half the things I ask for in Bard give me this:
"I'm still learning coding skills, so at the moment I can't help with this. I'm trained to do things like help you write lists about different topics, compare things, or build travel itineraries. Do you want to try any of those now?"