Hello So, my protagonist has a stammer I'm just wondering how you would write dialogue for someone who has a stammer or stutter if you could post an example of a random sentence that would be great
Well, I had a student once who suffered a terrible stammer. Of course there's the usual t-t-t-trick of elongating the start of certain words, if you're writing it. However, what I remember most about this guy was that he would often be unable to utter a sound at all. He was a cheeky little chap, and it didn't stop him from trying to communicate. He would stop in mid-sentence, and his face would take on a look that I could only describe as 'strangulated.' He would sometimes writhe around in his chair, as if the blockage was physical, and if he got himself into the right position, the words would start flowing again. His classmates were lovely to him, and he was actually a very popular character. They would wait in silence for him to continue, and while they occasionally laughed, it was with him, not at him. (He would laugh too.) They would often try to help him out, and one of them in particular (his best friend) would often step in with the right word. Once the right word was said, that seemed to free him up to continue what he was saying. He usually spoke very fast, as if he was trying to outrun the stammer.
As jannert says, custom is to elongate the beginning of the word, but be careful not to overdo it - it can make such dialogue irritating to read or just plain unreadable. Trouble is, it's your protagonist who has the stutter so, as I presume this is the character with most dialogue, you need to exercise even more restraint.
Definitely agree with restraint. Not only can you irritate the reader, but it can easily turn it into a farce. Just like with accents, let the reader know it exists, occasionally remind them (not necessarily in direct dialogue), and then let it go.
I've noticed that my eyes can autocorrect written stammer and if the stammering character has lots of dialogue, after a while I don't notice it at all anymore, so at least to me, even s-s-something l... like this is p-perfectly... readable. That is not to say that you can't overdo it and bear in mind that whatever you do, someone will always hate it.