I am a beginner to code this year, and I really hope I can move on and understand how to tackle some truly difficult tasks in the future. I am, however, pretty stumped by this one. I am writing a code that will count the instances of a word in an input and to just simply throw them into a list, no sorting of any kind. This is gonna be some very primal code, but I would think it would do it's simple job correctly, however, it seems to want to throw an 'a' in the middle of the input all the way at the beginning for no apparent reason. Why is this happening?
TLDR: Why is my code sorting an 'a' to the beginning of my dictionary?
Code:
wordDict = {}
text = input("Enter some text: ")
text = text.lower()
text = text.split()
print text
for word in text:
if word in wordDict:
wordDict[word] += 1
else:
wordDict[word] = 1
print wordDict
Thanks for your help and time :)
Edit: Picture Added