Question: I have two assignments/variables in my code: 

```
OUTPUT1="/Users/check/1.html"
OUTPUT2="/Users/check/2.html"

```

When I use one of the above, for instance, I write `c = open(OUTPUT1)`.

However, I think the correct approach for this would be to have something like a generic:

`OUTPUT="/Users/check/$var.html"` and then while using, I should first assign:

```
$var = 1.html
then open(OUTPUT)

```

This way I open `1.html`.

How do you do this in Python?

Answer: 
If you wanted to put it in a function:

```
def getPath(var):
  return "/Users/check/" + str(var) + ".html"

print(getPath(1))
print(getPath(2))

```
Perhaps you would consider using a tuple:

```
OUTPUT_PATHS = (
    '/Users/check/1.html',
    '/Users/check/2.html',
    '/tmp/3.html'
)

```

Then you can simply index them, starting with 0:

```
outnum = random(0, 3)
c = open(outnum)

```