Slicing Lists and Strings i don't understand


#1

Hi, I don't understand what is wrong in my code below:

animals = "catdogfrog"
cat = animals[:3] # The first three characters of animals
dog = slice = animals[3:6] #The fourth through sixth characters :arrow_left:
frog = slice = animals[6:] # From the seventh character to the end

i'm supposed to "Assign to dog a slice of animals from index 3 up until but not including index 6." and even after try everything i thought could be great in my slice, it's still wrong, so please just give me help if possible with my dog slice.
Thanks


#2

Hi,
Write it directly as
dog = animals[3:6]
frog = animals[6:]
Don't put the slice variable there.

Thank You


#3

That has really helped me izayashizu!:grin:

Also, why would you call yourself that?:confused: