|
|
| Hello, I have a list of strings and need change each string the same way, there are four different changes I need to apply. Right now I append each changed item to a new list. Is there a better way? |
| Make a function for it, and map it over the list, e.g.: mylist = map(change, mylist) Depending on the nature of changes, an LC/generator expression may be more appropriate. |
| autos06, thank you I will try that. |