functions in python

Discussion in 'Python' started by fade23, May 11, 2011.

  1. fade23

    fade23

    Joined:
    Apr 28, 2011
    Messages:
    3
    i have been isked to write a function in that recive to sequences ?

    i have write in that way but have wrong syntax can any one help me
    that is my code
    def f (*a,*o):
    l = tuple();
    for it in a.items():
    for y in o.items():
    if (y==it):
    l.append(y);
    return l;


    def test():
    m= (a,b ,c);
    v= (p, i ,n);
    print (f(v, m));


    the error that i accept it is

    fade@ubuntu:~/Desktop$ python simple.py
    File "simple.py", line 3
    def f (*a,*o):
    ^
    SyntaxError: invalid syntax

    plz i got crazy of that i need any help
     
    fade23, May 11, 2011
    #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. tshad
    Replies:
    11
    Views:
    830
    tshad
    May 27, 2005
  2. Timothy Wong
    Replies:
    3
    Views:
    425
    Timothy Wong
    May 20, 2004
  3. ILLOGIC
    Replies:
    1
    Views:
    373
    Rob Williscroft
    Jun 1, 2004
  4. Xiangliang Meng
    Replies:
    1
    Views:
    1,631
    Victor Bazarov
    Jun 21, 2004
  5. py
    Replies:
    5
    Views:
    316
    Daniel DeLorme
    Mar 24, 2007
Loading...

Share This Page