I'm trying to use **kwargs and facing a syntax error while using f-string in print function. I have no idea why it that an error? I'm using Python3.7.4 .
def func(**kwargs):
for k, v in kwargs.items():
print(f' {k} : {v} ')
func(first_name = 'x', last_name = 'y')
File "130819.py", line 4
print(f' {k} : {v} ')
^
SyntaxError: invalid syntax