To get n number of items you can use nltk.ngrams() with the number to get as the second argument.
In your example, to get four-grams, you can use nltk.ngrams(nltk.corpus.brown.words(), 4)
I know when you import everything you can do thinks like nltk.bigrams(nltk.corpus.brown.words() for bigrams and nltk.trigrams(nltk.corpus.brown.words() for triagrams, but how do you do four grams?
I've seen other ways to do it, but they all do it with a "string" or a text they make up. How do you do it with the nltk.corpus.brown? Do you have to covert it to a string and if so, how?
Finding Four Grams in an NLTK Corpus