Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started