Why am I getting “invalid syntax” from an f-string? [duplicate]

As suggested by Josh Lee in the comment section, that kind of string interpolation was added in Python 3.6 only, see What’s New In Python 3.6 (here it’s called “PEP 498: Formatted string literals”).

You, however, seems to be using Python 3.5.2, which does not support that syntax.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)