I have function that looks like this:
def CreateURL(port=8082,ip_addr ='localhost',request='sth'):
return str("http://" + ip_addr+":"+str(port) + '/' + request)
Now I want to use the default parameter for port and request but not for ip_addr. How do I have to write the function in this case?
CreateURL('192.168.2.1')
Does not work since itwill override the port and not the ip_addr
CreateURL(ip_addr='192.168.2.1')