Thread: double list

    #1
  1. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2005
    Posts
    43
    Rep Power
    0

    double list


    i have a list of values, and i want to double this list so that the values start over again. how do i do this?

    i.e.

    l1 = [1212, 2323, 1212]
    l2 = [1212, 2323, 1212, 1212, 2323, 1212]

    cheers
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    394
    Rep Power
    52
    Hi!

    Code:
    >>> l1 = [1,2,3]
    >>> l2 = l1 * 2
    >>> l2
    [1, 2, 3, 1, 2, 3]
    Regards, mawe

IMN logo majestic logo threadwatch logo seochat tools logo