Assigning multiple pins to one variable?

So I'm trying to learn to code and right now I want to assign a variable for each number on a 7 seg display so basically if

pin 1 is top left
pin 2 is bottom left
pin 3 is middle
pin 4 is top right
pin 5 is bottom right
pin 6 is top
pin 7 is bottom

(this is just my project you don't need to understand what I mean to help)

So now this is how I wish the code would go

int one = 1, 2;

so now that that variable is set I could do

void loop() {
digitalWrite(one, HIGH);
delay(1000);
digitalWrite(one, LOW);
delay(1000);
}

that would flash 1 on the 7 segment

so basically how could I do

int x = 1, 2, 3;

and now when x is modified pin 1, 2 and 3 will be modified.

int one = 1, 2;

Will not compile. A variable can have only one value.

Any other way of doing it?

What is your input to change numbers shown on the led? You could use a switch statement to select which pins are turned on depending on the value of your variable.

Assign each pin as a bit within a byte.

const byte Pin1 = 0b00000001
const byte Pin2 = 0b00000010
const byte Pin3 = 0b00000100
const byte Pin4 = 0b00001000
const byte Pin5 = 0b00010000
etc.
[code]
Then you can use logical OR ( | symbol) to join them together:
[code]
const byte NumberOne = Pin1 | Pin2;
etc

You can then do the digital writes as:

byte displayValue = NumberOne;

digitalWrite(1, displayValue & Pin1);
digitalWrite(2, displayValue & Pin2);
digitalWrite(3, displayValue & Pin3);
digitalWrite(4, displayValue & Pin4);
etc

[/code][/code]