Question: Here is my code at the moment

```
percentagesOff = [5,10,15.....]

for percentage in percentagesOff:
     print("Percent off: ",percentage, end= " ")

```

and the output looks like this

```
Percent off: 5
Percent off: 10
Percent off: 15

```

and so on.

This is an example of what I want my code to look like. (have to use nested for loops as part of homework)

```
                     $10     $100    $1000
Percent off: 5%       x       x        x 
             10%      x       x        x
             15%      x       x        x 
             20%      x       x        x

```

My question is focusing on this part 

```
Percent off: 5%
             10%
             15%
             20%

```

I'm struggling to figure out how to only print the `Percent off:` part once in my for loop.

Answer: 
You can just pull it out of the for loop, then it gets printed only once, or you could "remember" that you already printed it by setting some boolean variable to `True`(initialized at `False`) and then checking whether that variable is `True` or `False` before printing that part of the string.
The fact is that python print add line break after your string to be printed. So,
Import `import sys` and, before your loop, use that: 

```
sys.stdout.write('               $10     $100    $1000\n')
sys.stdout.write('Percent off:')

```

And now, you can start using print to write your table entries.

You can simply add a if statement with a boolean too.