Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

unlimited arguments

# unlimited arguments
def func(*args, **kwargs):
    print(args, kwargs)

func(1,2,3,4, k=0, x=8, hey=10) 	# print (1, 2, 3, 4) {'k': 0, 'x': 8, 'hey': 10}
Comment

PREVIOUS NEXT
Code Example
Python :: Flatten List in Python Using NumPy concatenate 
Python :: install requests-html in linux 
Python :: conditional relationship sqlalchemy 
Python :: os.listdir specific extension 
Python :: python using strip trim white sapce 
Python :: cv2 and PIL BRG to RGB 
Python :: python code to demonstrate inheritance with animal class 
Python :: python string ignore characters 
Python :: how to print list without newline 
Python :: facebook python 
Python :: menu with icons tkinter 
Python :: pandas options 
Python :: python get timestamp 2020-04-23T12:00:00Z 
Python :: 9x9 grid tkinter 
Python :: how to make a window with tkinter 
Python :: get value of bit in integer python 
Python :: python cast number to between 0 and 1 
Python :: pandas assign value to row based on condition 
Python :: Python __add__ magic method 
Python :: bell number python 
Python :: change state enabled tkinter 
Python :: how to split a dataframe into train and test 
Python :: s=0 def sum(x,y): n=int(input("enter no. of terms") for i in range(n): l=int(input("enter no.")) s=s+l print(s) sum() 
Python :: python chunk text 
Python :: how to install dependencies python 
Python :: structural pattern matching python 
Python :: python combinations function 
Python :: how to input sentence in python 
Python :: how to loop through lines python 
Python :: set lable of field django 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =