exxy = ['mix', 'xyz', 'aardvark', 'xanadu', 'apple']
pleasework = []
ten = []
for s in exxy:
if s[0] == 'x':
pleasework.insert[0, s]
else:
ten.append[s]
pleasework.sort()
ten.sort()
pleasework.append(ten)
print pleasework
I keep getting an error that says that object is not subscriptable.
Traceback (most recent call last):
File "/Users/jerrywalker/Desktop/CompSci/Programming/Programming_Resources/Python/idle.py", line 10, in <module>
ten.append[s]
TypeError: 'builtin_function_or_method' object is not subscriptable
I'm not really sure what this means. I've just started Python yesterday... I'm sure it's something in the code that I'm not doing right, because even when I change the name of my variables around the error is the same.