Question: Will this code create an error? my_list = [] my_list.append('Dog') my_list.append('Cat') for pets in my_list: print(fI love my {pets})
Will this code create an error? my_list = [] my_list.append('Dog') my_list.append('Cat') for pets in my_list: print(f"I love my {pets}")
Step by Step Solution
There are 3 Steps involved in it
No the code you provided will not create an error It appends ... View full answer
Get step-by-step solutions from verified subject matter experts
