"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > Thank you guys. > > My function should multiply every element of a list, for example > "something" > and "something" can be an integer or another list. > If it deals with integer than it is ok, but > If it deals with list than it become false for example list*2 = > listlist, and what I really want is to mutlitply its member.
Which member? A list can have many members ... or none at all. > That's why I need to know the type of my data in "something". No, you don't need to know its type at all. You need to know whether it is a sequence or not ... which is a far cry from knowing its type. > By the way I am new in python, I heard that it has a MatLab > capabilities, How good is that? Depends on what you mean by "MatLab capabilities". Matlab is highly matrix oriented, therefore it provides lots of fast matrix operations, and syntactic sugar for dealing with matrices. If you want to think of everything as a matrix, then you could well be disappointed by Python. There is a package for driving matlab from Python, which you might find interesting (it might even be what you meant by "MatLab capabilities"). Google is your friend. -- http://mail.python.org/mailman/listinfo/python-list