s1 = "This has been a long day"
print(s1)
print('-'*30) # 30 dashes
s2 = ""
# splits sentence at white spaces
for word in s1.split():
print(word) # test
if word == "day":
word = "night"
s2 += word + " "
print('-'*30) # 30 dashes
print(s2)
'''my result >>
This has been a long day
------------------------------
This
has
been
a
long
day
------------------------------
This has been a long night
'''