'vs code terminal result different from locale terminal

I am trying to run a python code using VS code, I noticed that the result is different from the local terminal. here is the code:

import tensorflow as tf
from tensorflow import keras
import os
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

os.environ['TF_CPP_MIN_LOG_LEVEL']='2'

a=tf.constant(10)
print(f"a = {a}")

its successfully running using my local terminal and I am having the error below while using my vs code terminal.

File "00-test.py", line 11
    print(f"a = {a}")
                   ^```


Solution 1:[1]

you can check if the two pythons in vscode terminal and local terminal have the same version,or with the same enviro

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Peter