sleep() returns the number of seconds slept.
will print "hellothisisatest". So, since sleep() is returning a value, it's getting printed as part of the print statement, since print supports comma separated arguments. What you're seeing is the '1' that sleep(1) is returning being printed after the '\n' from the preceeding line.