Works!
Very new to Python... However, I wrote this little list making script.
If I run this, and go to my def Edit(), the script errors out when its asked to remove the item from the list using the user input. If the item in the list is just a single character, it succeeds without error. Any ideas?
import console
list = []
def view():
print("Viewing Data")
sortlist = sorted(list)
print "\n".join(sortlist)
x = raw_input().title()
if x == "Q":
return
def add():
print("In Adding Mode")
sortlist = sorted(list)
print "\n" .join(sortlist)
x = raw_input().title()
if x == "Q":
return
else: list.append(x.title())
console.clear()
add()
def edit():
print("Edit List, Remove?")
sortlist = sorted(list)
print "\n" .join(sortlist)
x = raw_input().title()
if x == "Q":
return
else: list.remove(x)
console.clear()
edit()
while True:
console.clear()
choice = ["[A]dd to list" , "[V]iew List" , "[E]dit List"]
print("List App")
print('\n'.join(choice))
print("Use 'q' to Exit")
x = raw_input().title()
if x == "A":
console.clear()
add()
elif x == "V":
console.clear()
view()
elif x == "E":
console.clear()
edit()