I need to get a user to enter a sentence for an assignment. Using a for
loop, I then need to replace all spaces with %20
in order to prep the string to be used as a URL. I cannot for the life of me figure it out.
sentence = str(input("Please enter sentence:"))
space = (" ")
for space in sentence:
space.replace(sentence, space, "%20", 500)
print(sentence)
This is what I have entered so far but it is completely wrong.