Using locals() and format() method for strings: are there any caveats?

There is now an official way to do this, as of Python 3.6.0: formatted string literals. It works like this: f’normal string text {local_variable_name}’ E.g. instead of these: “hello %(name) you are %(age) years old” % locals() “hello {name} you are {age} years old”.format(**locals()) “hello {name} you are {age} years old”.format(name=name, age=age) just do this: … Read more

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