A have a list that has the following structure.
mylist=list(y~ A,
y ~ A+B,
y ~ A+B+C)
I want to replace (transcode) "y "with "z". my goal
mylist=list(z~ A,
z ~ A+B,
z ~ A+B+C)
Q: How to replace (recode) the values in the list?
I tried this:
for i in range(len(mylist)):
mylist[i] = mylist[i].replace('y','z')
does not work
source
share