그래서 txt 파일에서 짝수 번째 줄을 읽으려면 코드가 필요합니다. 다음은 작업의 예입니다.Python. 텍스트 파일의 짝수 번째 줄
입력 :
Bravely bold Sir Robin rode forth from Camelot
Yes, brave Sir Robin turned about
He was not afraid to die, O brave Sir Robin
And gallantly he chickened out
He was not at all afraid to be killed in nasty ways
Bravely talking to his feet
Brave, brave, brave, brave Sir Robin
He beat a very brave retreat
출력 :
Yes, brave Sir Robin turned about
And gallantly he chickened out
Bravely talking to his feet
He beat a very brave retreat
그래서 문제가 무엇입니까? [여기] (http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files)를 시작하십시오. –