i have modified the code <br>
now its this.<br>
please see it and check if i have anything the wrong way.<br>
like if i should have used some method but used some other.<br>
i am new to programming so i have no idea what mistakes i make/<br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">shoplist = []#the list i use<br>
print shoplist<br>
c=True<br>
while c:#the list making loop<br>
    a= raw_input('enter items ')<br>
    if a == 'quit':<br>
        c=False<br>
    else: <br>
        shoplist.append(a)<br>
    <br>
    print shoplist<br>
else :<br>
    print 'shoplist done'<br>
print 'are you done with your shoppiing list\n',<br>
print 'there are',len(shoplist)#\n'items in your shoplist',<br>
print 'to remove one enter remove.\n to add more enter add\n to stop
enter stop\n to show items enter show\n to count items enter count',<br>
def remove():<br>
    shoplist.remove(raw_input('remove what: ')),<br>
def add():<br>
    shoplist.append(raw_input('add what : ')),<br>
#def stop():<br>
#    break<br>
c = True<br>
def show():<br>
    print shoplist<br>
def count():<br>
    print len(shoplist)<br>
while c:<br>
    b = raw_input('enter command : ')<br>
    if b =='add':<br>
        add()<br>
    if b =='remove':<br>
        remove()<br>
#how do i add a way to prevent error when item is not in list.<br>
#i mean show an error message of my own.<br>
            <br>
    if b =='stop':<br>
        c = False<br>
    if b =='show':<br>
        show()<br>
    if b =='count':<br>
        count()<br>
f = len(shoplist)<br>
while len(shoplist) > 0 :<br>
  <br>
    if len(shoplist) > 0:<br>
    #for f > 0:<br>
        print 'have you bought any items
yet \n you may wish to remove them, from the    
    list',<br>
        #print 'what did you buy',<br>
        shoplist.remove(raw_input('what did you buy: '))<br>
    else :<br>
        print 'all items bought',<br>
        <br>
        <br>
    #how do i print this list as a text file.<br>
  <br>
        <br>
  <br>
</blockquote>