i am beginning to learn python so please be easy on me, i am trying to create a function that will accept user input and store it in a list, separating words and ignoring punctuation example:
input = i.am/lost
stores in list as ",[am][lost]"
this is what i got so far
def text(): sentence = 0 while line !="EOF": sentence= raw_input() line1 =  processed_line = "" for char in sentence: if char.isalpha(): processed_line = processed_line+char else: processed_line = processed_line+" " line1.append(processed_line) line1.split() print processed_line print line1 text()
my problem is that its adding it all under 1 item in the list instead of separating word by word
thanks in advance