Write, Then Append

Easy · Pipelines & Redirection · Redirection

Problem

Write first into out.txt, then add second to it, then print the file.

out.txt may already contain something — the first write must replace it.

Approaches

Related problems

Start free on Cariara · Coding problems · System design studio

Starting Python
No results yet.

          
↑↓ move ↵ open esc close

Labs

Loading labs…

Run with your own input

Starting Python

Loading Python…