First of all... this is called a tuple right: 1024,768 ?

Ok now for my main question.

How do i get a number list like this

windowSize = 1024,768

and then set a variable that is equal to the first number and then another that is the second number in that list?

Thanks guys

## 3 Replies - 1054 Views - Last Post: 14 June 2009 - 08:05 AM

### #1

# How do i get the first number out of a list of two numbers?

Posted 14 June 2009 - 05:30 AM

##
**Replies To:** How do i get the first number out of a list of two numbers?

### #2

## Re: How do i get the first number out of a list of two numbers?

Posted 14 June 2009 - 06:39 AM

Both list and tuple are data structures you can use for this purpose-

Use list like this-

and tuple-

Then you can recall it by-

Use list like this-

windowSize=[1024,768]

and tuple-

windowSize=(1024,768)

Then you can recall it by-

windowSize[0] windowSize[1]

### #3

## Re: How do i get the first number out of a list of two numbers?

Posted 14 June 2009 - 06:49 AM

Just what i needed thanks so much!!!

### #4

## Re: How do i get the first number out of a list of two numbers?

Posted 14 June 2009 - 08:05 AM

Nice to know that. Hope to see you around the forum many times...

Page 1 of 1