python - sep和end用法

  1. sep: 中间隔开
  2. end: 结尾隔开
print('G','F', sep='', end='') 
print('G') 
#\n provides new line after printing the year 
print('09','12', sep='-', end='\n') 
  
print('prtk','agarwal', sep='', end='@') 
print('geeksforgeeks') 

GFG
09-12
prtkagarwal@geeksforgeeks

你可能感兴趣的:(Python)