values=[counts[letter]forletterinletters]# pobierz ilości wyrazów dla poszczególnych liter
plt.bar(letters,values)
plt.xlabel('Litera')
plt.ylabel('Ilość wyrazów')
plt.title('Ilość wyrazów zaczynających się na poszczególne litery alfabetu')
plt.show()
if__name__=="__main__":
text="Success is often defined as the ability to reach your goals in life, whatever those goals may be. In some ways, a better word for success might be attainment, accomplishment, or progress. It is not necessarily a destination but a journey that helps develop the skills and resources you need to thrive."