The default output of print is newline. If you want to achieve no newline, you need to add end="" at the end of the variable :
student_age=18
print ( " The age of the student is: " , student_age )
#print(" The age of the student is: "), print(student_age) without line break
#print wraps by default after execution
print("hello,world!",end="\n")
print("hello,world!",end="") # 不换行
print("hello,world!",end="")
print("Abby","Candy","Tina","Sandy",sep="==")
sep separator
Such as:
money = 121
print ( " The amount of this consumption is: " , money , sep = "$" )
print can also output content to a file
str01 = " This consumption amount is: $128"
file01 = open("d:\sales.txt","w")
print ( str01 , file = file01) #There will be exceptions in file output, and exception handling is required