+ 1
Can i change a letter in a string in a list
word =['hello'] word [0][0] = 'H'
2 ответов
+ 1
The following code you gave above won't work.Strings can only be used to read and can't change its value when you see it in the form of touples .☺
But still you could change the value given the string by the slicing methord ,😉
like this ::
word=["hello"]
print ("H"+word[0][1:])
I hope you understand .....😋😋😋🤗
+ 1
it worked! 🤣i hope to learn more about the slicing method later in the lessons