read numbers from file and covert to integer

2005-01-09 Thread Øystein Western
I got a file with a lot blocks of numbers that are strings. I'd like to read all this numbers and convert them to numbers for futher compareation. How can I convert all this numbers to integer? Do I have to put all numbers into a list? regards frengky -- Organisation nr: 983063349 Frengky, Ol

countint words from an input string

2005-01-07 Thread Øystein Western
Hello! 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 written. Startet out like this: /- s = raw_input("Write a text line") print s.split() / How can I count the words