Hi. I'm new in python and I need some help.
I need to make a program that does this:
You put in a sentence, then the program puts it in a list. Words can be with one or more spaces; if there are more than one, the program should recognize them as only one. The only thing that is printes is the list.
Type something: Today is sunny and warm
Right now I'm stuck here:
list = raw_input("Type something: ") for string in list: if string != " ": print string
This thing is useless, it only gets all the spaces out and prints everything else (which it shouldn't be printed but I don't know how to do it another way).
Any help would be much appreciated.
sorry for my English