need help subtracting lists in python

Discussion in 'Python' started by the_skin, Oct 1, 2009.

  1. the_skin

    the_skin

    Joined:
    Oct 1, 2009
    Messages:
    1
    Likes Received:
    0
    I have:
    x=[4,6,8]
    y=[1,3,7]
    how do I subtract these to lists so that it would print out [3,3,1]

    Cheers
     
    the_skin, Oct 1, 2009
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Henry
    Replies:
    6
    Views:
    16,425
    Brian Henry
    Nov 19, 2003
  2. =?Utf-8?B?TWFubnkgQ2hvaGFu?=

    subtracting days from date

    =?Utf-8?B?TWFubnkgQ2hvaGFu?=, Nov 8, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    28,053
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Nov 9, 2004
  3. patrick
    Replies:
    2
    Views:
    8,437
    patrick
    Dec 23, 2005
  4. Stevens

    Subtracting dates

    Stevens, May 2, 2004, in forum: Java
    Replies:
    2
    Views:
    14,745
    Eugene Rosenzweig
    May 2, 2004
  5. Mark Sargent
    Replies:
    0
    Views:
    370
    Mark Sargent
    Jun 2, 2005
  6. Mark Sargent
    Replies:
    4
    Views:
    424
    Dennis Lee Bieber
    Jun 3, 2005
  7. =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==

    List of lists of lists of lists...

    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==, May 8, 2006, in forum: Python
    Replies:
    5
    Views:
    709
    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==
    May 15, 2006
  8. Chris Weisiger

    Help with sorting lists of lists

    Chris Weisiger, Oct 14, 2004, in forum: Perl Misc
    Replies:
    7
    Views:
    396
    Tad McClellan
    Oct 14, 2004
Loading...