title: Python: How can I calculate the average word length in a sentence using the .split command?
body: <p>new to python here. I am trying to write a program that calculate the average word length in a sentence and I have to do it using the .split command. btw im using python 3.2</p>
  
  <p>this is what I've wrote so far</p>
  
  <pre><code>sentence = input("Please enter a sentence: ")
  print(sentence.split())
  </code></pre>
  
  <p>So far i have the user enter a sentence and it successfully splits each individual word
  they enter, for example: Hi my name is Bob, it splits it into ['hi', 'my', 'name', 'is', 'bob']</p>
  
  <p>but now I'm lost I dunno how to make it calculate each word and find the average length of the sentence.</p>