2

これは機能します(1行のみ):

   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 をどのように使用しますか?

4

1 に答える 1