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: 
Here is one alternate solution:

```
percentagesOff = [1,2,3,4,5,6,7,8,9,10]
print 'Percent off:    ', percentagesOff[0]            #use blanks instead of '\t'
for percentage in percentagesOff[1:]:
    print ' '*len('Percent off:    '), percentage      

```

The last line, leaves one blank space for every character of the string ''Percent off: '' and then start printing elements of array.

Basically, "len('something')" returns how many character does the string 'something' include. Then we muliply ' ' (which is one space) by that number.
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.