Calculating perplexity python

Print it