Home > other >  New students turn to Python
New students turn to Python

Time:09-26

Enter multiple lines in English characters, display them with the serial number, until the end of the input "quit", enter the number of rows of statistics

CodePudding user response:

 
The line=0
Text_lst=[]
While True:
Text=input (f 'please enter the English string line {line + 1} :')
If (text=='quit') :
Print (f '\ n total input the following line {line} English string:')
For englist in text_lst:
Print (englist)
Break
The line +=1
Text_lst. Append (f '{line}, {text}')
  • Related