More accurate would be
if data.startswith("PING"):
con.send("PONG")
print("Pong sent!")
But I’ve used something as dirty as checking if the first character in data is P, because in Twitch chat only PING messages start with P (others start with a colon : or another letter)