Challenge: Copying Content into Files Using Threads

Write a program that reads the contents of three files, converts them into uppercase, and writes them into other files.

Write a program that reads the contents of three files called a.txt, b.txt, and c.txt, converts their contents into uppercase, and writes them into files aa.txt, bb.txt, and cc.txt by launching three different threads. The program should report the time required to carry out this conversion. The files a.txt, b.txt, and c.txt should be added to the project and filled with some text. The program should receive the file names as command line arguments:

  • Input: The names of the source and destination files will be given as arguments in the command to run the main.py file.
  • Output: The program will print the time required to carry out this conversion. It will create three output files and copy the converted text of the input files into them.

Get hands-on with 1200+ tech skills courses.