0
How to? Python.
How do i change the 2nd elements first letter to another in list? When i tried there was only one letter left.
4 odpowiedzi
+ 1
If you have list with strings you can use replace()
ex : list[0]=list[0].replace('o','a')
But there is also another approach , like convert string to list , modify and then put it back together in string
+ 1
Or even easyer , you can do like this :
list[0]= 'X'+list[0][1:]
0
Thank you alot
0
Hi Leaf
Has your problem been resolved? I didn't completely understand your question. If you're still having issues, please share an example of what you're trying to achieve. Thanks. :)