We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
If you're ever unsure of what a function is doing in example code you should look at the documentation. Print is a built-in function of python so you can simply google "python documentation print" :
As seen in the link, "sep", or "separator", is the parameter that specifies what separate the series of outputs by. The default is ' ' (a space), which will be used when you specific.
In this example, "hi" and "there" are outputs.
print("hi", "there", sep="x") => hixthere
"\n" means new line, so the outputs are each on a new line.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Array Mathematics
You are viewing a single comment's thread. Return to all comments →
If you're ever unsure of what a function is doing in example code you should look at the documentation. Print is a built-in function of python so you can simply google "python documentation print" :
https://docs.python.org/3/library/functions.html#print
As seen in the link, "sep", or "separator", is the parameter that specifies what separate the series of outputs by. The default is ' ' (a space), which will be used when you specific.
In this example, "hi" and "there" are outputs. print("hi", "there", sep="x") => hixthere
"\n" means new line, so the outputs are each on a new line.