functions in python

Joined
Apr 28, 2011
Messages
3
Reaction score
0
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top