countint words from an input string

Øystein Western info at
Fri Jan 7 09:58:06 EST 2005


Try to write som code that will get an input string from the user. Futher 
more, I'd like to have the program to count all the word the user has 

Startet out like this:

s = raw_input("Write a text line")
print s.split()

How can I count the words in the split function. Do I have to use the split 
function to count the words in the S variable?


Organisation nr: 983063349
Frengky, Olsokveien 65,1727 Sarpsborg, Norway
Tel: +47 92611725
Fax: +47 69152017
Email: oystein.western at

More information about the Python-list mailing list