+ 3
Fill in the blanks to replace all '!' characters in str with a dot '.' x = str. replace (' ', ' ')
anyone explain this question .? i couldn't understand the statement plz explain it .. how it is solved .. i lose 3 lives heart on this question unfortunately...
5 ответов
+ 6
There it asking to fill the blanks with correct answer.
ex: str.replace( existing_word, replace_word) will return a new string with all words having "existing_word" , will be replaced by "replace_word". So it will new string having "replace_word", inplaces of "existing_word".
for ex:
s1 = "abcda"
s2 = s.replace("a", "z")
now s2 will be having value "zbcdz".
#all "a" is replaced by "z".
So can you now guess the correct answer of your question?
hope it helps...
+ 2
No
x = str.replace('!', '.')
No space and '!' is gets replaced with dot(.). *"Check the output.
1st argument('!') , is old word and is replaced by 2nd argument word ('.') is new word will appears..
+ 1
I guess x = str. replave(' .', '!')
Is this true?
0
Yes, is true
0
replace*