562 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Software ==> | Python (34 exercises) |
Topic ==> | Files and folders (3 exercises) |
Level ==> | Average difficulty |
Subject ==> | Python training |
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
The text file in the folder above contains a list of Muppets:
The file stores the animal type and colour of each Muppet.
Write a program which does the following to get the results shown below:
Step | Hint |
---|---|
Opens the file | Use with open(file_path,"r") as file_name |
Reads in the lines | Use read() to get the entire contents, then apply splitlines() to get a list of lines |
For each line, gets the details | Use split(",") to get a list of the details |
Prints out the results for each | You could use muppet, animal, colour = muppet_list to unpack the list into distinct variables |
You don't have to use the hints - there are many ways for a wise owl to skin a python!
Your program should produce this output:
This should be the output from your program.
When everything is working, close down your program!
You can find other training resources for the subject of this exercise here:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2023. All Rights Reserved.