String text manipulation
Need help with string manipulation in python!
I don't think I understand the question properly, but if you want to replace characters in a list of strings you can use list comprehension and use replace method on the string elements
Here's an example - https://i.imgur.com/5JyKF69.png
More on reddit.comString Manipulation
Python String Manipulation Handbook
Videos
Hello I have a list of strings called "stringList" that has the following lines
stringList = [
// ! [words]
// ! [words]
// ! [words]
//! [words]I need to loop through this list of strings and change the beginning "// !" or "//!" to just simply "//#". Is there any way I could do this?
I don't think I understand the question properly, but if you want to replace characters in a list of strings you can use list comprehension and use replace method on the string elements
Here's an example - https://i.imgur.com/5JyKF69.png
The example you provided doesnt make sense in Python, could you show us the actual code?