It looks like you are confusing list comprehension with looping constructs in Python.
A list comprehension produces -- a list! It does not lend itself to a single assignment in an existing list. (Although you can torture the syntax to do that...)
While it isn't exactly clear what you are trying to do from your code, I think it is more similar to looping over the list (flow control) vs producing a list (list comprehension)
Loop over the list like this:
for pattern in patterns:
if lst[0] == pattern: lst[0]=''
That is a reasonable way to do this, and is what you would do in C, Pascal, etc. But you can also just test the list for the one value and change it:
if lst[0] in patterns: lst[0] = ''
Or, if you don't know the index:
i=lst.index[pattern]
lst[i]=''
or, if you have a list of lists and want to change each first element of each sublist:
for i, sublst in enumerate(lst):
if sublst[i][0] in patterns: sublist[i][0]=''
etc, etc, etc.
If you want to apply something to each element of a list, then you can look at using a list comprehension, or map, or one of the many other tools in the Python kit.
Personally, I usually tend to use list comprehensions more for list creation:
l=[[ x for x in range(5) ] for y in range(4)] #init a list of lists...
Which is more natural than:
l=[]
for i in range(4):
l.append([])
for j in range(5):
l[i].append(j)
But to modify that same list of lists, which is more understandable?
This:
l=[['new value' if j==0 else l[i][j] for j in range(len(l[i]))] for i in range(len(l))]
or this:
for i,outter in enumerate(l):
l[i][0]='new value'
YMMV
Here is a great tutorial on this.