Q236. 영어 문장에 포함된 공백(' ')을 밑줄('_')로 치환하는 프로그램을 완성하시오. (400점)
__________ = ['Love me, love my dog.','No news is good news.',
'Blood is thicker than water.']
for sentence in sentences :
x = ________.________(' ', '_')
print(x)
- 난이도(1~10) : 4
- 힌트 :
- - 실행 결과
-
Love_me,_love_my_dog.
No_news_is_good_news.
Blood_is_thicker_than_water.
sentences = ['Love me, love my dog.','No news is good news.',
'Blood is thicker than water.']
for sentence in sentences :
x = sentence.replace(' ', '_')
print(x)