Functions5(creating variable for large inputs)
##arbitrary argument
def add(*x): ## *:-class tuple, allows to take more than one variable
return sum(x)
print(add(1,2,3,4,5,6,78,9,1,2,3,4,6,7,8,8,9,))
"C:\Users\darul Haram\PycharmProjects\pythonProject2\venv\Scripts\python.exe" "C:/Users/darul Haram/PycharmProjects/pythonProject2/venv/Lib/functions5(arbitrary argument).py" 156 Process finished with exit code 0
Comments
Post a Comment