+ 1

help with this code

hello! im trying to replace items 0,3,4 with pancakes. i managed to do item 0, but cant get the other 2 right. any suggestions? https://www.sololearn.com/compiler-playground/cqh63cpEANNI

14th Jun 2023, 9:47 PM
Ronal Castro
12 Answers
0
cant use that key yet. need to use the indexing.
14th Jun 2023, 10:08 PM
Ronal Castro
0
@your mom cant use .replace due to the fact that im still in the indexing/list course. i need to use indexing to replace the strings
14th Jun 2023, 10:21 PM
Ronal Castro
0
@your mom i've tried day. AI denies the code.
14th Jun 2023, 10:32 PM
Ronal Castro
0
pretty much the output, if i input 0, has to read 'pancakes', 'Waffles', 'Yogurt', 'Burrito', 'Toast' if i input 3, 'Donuts', 'Waffles', 'Yogurt', pancakes', 'Toast'] input 4, 'Donuts', 'Waffles', 'Yogurt', 'Burrito', 'pancakes']
14th Jun 2023, 10:35 PM
Ronal Castro
0
thanks!! totally forgot about the if/ else
14th Jun 2023, 10:49 PM
Ronal Castro
0
has anyone found the answer to this cause I've been stuck on this and I can't seem to understand where I'm going wrong https://www.sololearn.com/compiler-playground/cSro3W3YRkfo
12th Oct 2023, 6:49 PM
Junior Usuanlele