描述
Given a text file file.txt, print just the 10th line of the file.
题目链接:https://leetcode.com/problems/tenth-line/
分析
题目的意思很简单,就是输出文件的第十行,需要考虑文件行数少于10的情况。
代码
1 | Solution 1 |
Given a text file file.txt, print just the 10th line of the file.
题目链接:https://leetcode.com/problems/tenth-line/
题目的意思很简单,就是输出文件的第十行,需要考虑文件行数少于10的情况。
1 | # Solution 1 |