Hello. Please help me to find a mistake in the following Python code:
[code]
#dictionary
fcolor={“Peter”:”blue”,”Laura”:”green”,”Tom”:”brown”,”Ema”:”violet”}
#print(fcolor[“Tom”])
#print()
for k,v in fcolor.items():
print(k+” likes “+v+” color.”)
The objective is to output a line for each name listed in this form:
(first name) likes (color name) color.
Thank you.
=====
compiler says:
Traceback (most recent call last):
File “/usr/lib/python3.8/py_compile.py”, line 144, in compile
code = loader.source_to_code(source_bytes, dfile or file,
File “<frozen importlib._bootstrap_external>”, line 846, in source_to_code
File “<frozen importlib.
File “./prog.py”, line 10
print(k+” likes “+v+” color.”)
^
SyntaxError: invalid character in identifier
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “<string>”, line 1, in <module>
File “/usr/lib/python3.8/py_compile.py”, line 150, in compile
raise py_exc
py_compile.PyCompileError: File “./prog.py”, line 10
print(k+” likes “+v+” color.”)
^
SyntaxError: invalid character in identifier