Question: How do I define a function that takes a list of strings as it's parameter and returns a colours dictionary from the parameter string? -->
How do I define a function that takes a list of strings as it's parameter and returns a colours dictionary from the parameter string?
--> def create_colours_dictionary(lines)
lines = ['1:brown' , '2:bisque' , '3;white' , '4:purple' , '5:tan']
output:
1 brown
2 bisque
3 white
4 purple
5 tan
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
