|
|
|
|
|
by carl_dr
1517 days ago
|
|
What if you wanted to append a string with braces, could you? (I don’t know Python!) Plus it would lead to subtle security vulns and other bugs. A contrived example : f”{bot} spammed my repo saying” + “touch(‘{path}’) was wrong lol.” Now my path var has been disclosed. |
|
Ex:
n = "hn"
print(f"hello {n} your path is {{path}}")
Out: hello hn your path is {path}