First and Last
Easy · Pipelines & Redirection · head · tail
Problem
Print the first two lines of log.txt, then its last line.
Approaches
- head then tail
Related problems
Start free on Cariara · Coding problems · System design studio
Easy · Pipelines & Redirection · head · tail
Print the first two lines of log.txt, then its last line.
Start free on Cariara · Coding problems · System design studio
A problem statement, a real editor, graded tests, and several worked solutions with complexity for every problem. Python runs in your browser — real CPython, no submissions, no waiting on a queue.
CPython via Pyodide in a worker. An infinite loop costs you the worker, not the tab.
Each published solution is executed against every test for its problem. A solution that fails is a build failure.
Solved marks, drafts and notes are saved to your account and sync across the machines you sign in on.
Loading Python…