需要快速帮助,水平打印

Need help quickly, in printing horizontally

在星号打印处加上end=' '即可

#Function for Trailing asterisk

star_trailing= '*'
def trailing():
    for p in range(5):
        print(star_trailing, end='  ')

#input
print("progress",end = '  ')
print("Trailing",end = '  ')
print("Retriever",end = '  ')
print("Excluded")
progress()
trailing()

使用


star_progress = '*'
def progress():
    for p in range(4): # you added one extra
        print(star_progress, end="\t\t\t", sep="")
   
# you cant call any function you write without defining it first  
        
print("Progress",end = '  ')
print("Trailing",end = '  ')
print("Retriever",end = '  ')
print("Excluded")
progress()