for color in colors:
color_count = color_count(color)
You pass a string assigned to the variable color as the argument to the function color_count
The function color_count returns an integer value.
You are then assigning this returned value to the variable color_count.
Now, color_count is no longer a function but an integer.
You shouldn’t assign the returned integer to a variable with the same name as the name of the function.
so assigning the integer to a variable with the same name as the function renders the function useless? As in, it can no longer be called because the computer no longer sees color_count as a function, but rather as just the integer from the first iteration? If that’s the case, then does it break because now that color_count is just an integer, the (color) argument just purely doesn’t make sense with the syntax?