7

So I just started using Python and I'm getting this weird bug in Visual Studio Code. I'm using F Strings and inside the editor, it says it's invalid syntax. enter image description here

Why does this have a red underline? It's apparently also invalid syntax even though the code does work correctly from the command prompt. enter image description here

The extensions I have enabled are Beautify, ESLint (the file is picking up as MagicPython down the bottom so I assume this doesn't affect it), MagicPython, Material Theme, Python, Visual Studio IntelliCode - Preview. Thanks! Neeron.

NeuronButter
  • 569
  • 5
  • 22

1 Answers1

0

I just use the extensions called python and I meet the same question like that. the question I meet Just adjusting the version of python which is used by the extend can solve the problem.change this

  • 1
    As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Nov 16 '21 at 03:35