Syntax meaning - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Homework (https://python-forum.io/forum-9.html) +--- Thread: Syntax meaning (/thread-12987.html) |
Syntax meaning - SUHIN - Sep-22-2018 zip(*np.where(myarray == 0)) what does the * in front of np denote in a syntax RE: Syntax meaning - Gribouillis - Sep-22-2018 In general, func(*param)means that param is a sequence of python objects (eg a list, tuple, ...) and these objects are used as parameters in the call to function func . For exampleparam = [1, 2, 3] func(*param)has the same effect as calling func(1, 2, 3)Calling func(*param) is different from calling func(param) , because the latter calls func with a single list argument, namelyfunc([1, 2, 3]) |