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
    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. Advertising

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,192
    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:
    27,550
    =?Utf-8?B?QmlsbCBCb3Jn?=
    Nov 9, 2004
  3. Mark Sargent
    Replies:
    0
    Views:
    293
    Mark Sargent
    Jun 2, 2005
  4. Mark Sargent
    Replies:
    4
    Views:
    328
    Dennis Lee Bieber
    Jun 3, 2005
  5. =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==

    List of lists of lists of lists...

    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==, May 8, 2006, in forum: Python
    Replies:
    5
    Views:
    425
    =?UTF-8?B?w4FuZ2VsIEd1dGnDqXJyZXogUm9kcsOtZ3Vleg==
    May 15, 2006
Loading...

Share This Page