这个有效(仅一行):
c.execute(f"SELECT Firm, Platform, `Sale in million` FROM database WHERE Platform IN ({','.join('?' for _ in list_table)}) ORDER BY Firm", (list_table))
但这些没有(2行):
c.execute(f"SELECT Firm, Platform, `Sale in million` FROM database
WHERE Platform IN ({','.join('?' for _ in list_table)}) ORDER BY Firm", (list_table))
c.execute(f"SELECT Firm, Platform, `Sale in million` FROM database"
f"WHERE Platform IN ({','.join('?' for _ in list_table)}) ORDER BY Firm", (list_table))"
c.execute("SELECT Firm, Platform, `Sale in million` FROM database"
f"WHERE Platform IN ({','.join('?' for _ in list_table)}) ORDER BY Firm", (list_table))"
如何在多行中使用 f-string?