a="ypbs,oel!osks,oey?" count_sent =0 for symbol in a: if symbol==",": count_sent+=1 print("колличество запятых",count_sent)