I have been trying to use the separator function with a message that uses the input function, but it seems the that the separator function does not work and it only prints out the inputed phrase. For ex. I use sep="..." and would expect my inputed phrase to print out "This...Is...My...Inputed...Phrase" but instead I receive "This is my inputed phrase".
# Asking for user to input any phrase or word they want
user_phrase = input('What is the phrase you want to print?')
# using the seperator function to seperate the inputed phrase by the desired users choice of string.
print(user_phrase, sep='...')
The
sepparameter is used when you pass in more than one argument toprint()like:To get your desired output, you need to turn your single string into multiple strings.
split()will do that. Then you need to turn those into individual arguments toprint(). You can do that like this: