I noticed that parts of my last print()-function statement got pushed down when I formatted it with autopep8 in VSC and I don't understand why. This only occurs, if I have the temp foor loop variable {guesses\_Taken} inside the String.

```py
if guess == secret_number:
    print(
        f'Good job, {name}! You guessed my number in {guesses_taken} guesses taken')

```

Without the variable, it's formatting like usual:

```py
print(f'Good job, {name}! You guessed my number in  guesses taken')

```

I tried to print a temp. for loop variable in another file to reproduce the problem, but here it's working properly.

```py
numbers = 23
for i in range(3):
    x = i
if x == 2:
    print(f'Number {i} and Number {numbers}')

```

Original Code with formatting problem in last line

```py
for guesses_taken in range(1, 7):
    print('Take a guess.')
    guess = int(input())
    if guess < secret_number:
        print('Your guess is too low.')
    elif guess > secret_number:
        print('Your guess is too high')
    else:
        break  # This condition is for the correct guess
if guess == secret_number:
    print(
        f'Good job, {name}! You guessed my number in {guesses_taken} guesses taken')

```

Is it a bug or can I improve something?
The program itself is working properly.

Thank you in advance!

Full source code line #21: <https://pastebin.com/D66mDm5K>
VSC Version: 1.72.1