Code-Net
Code-Net

Reputation: 1

Issue in f-string inside a function

i have this baaasic script of f-string inside a function, i want to know why there is no returned result when i run it :

def show_me_ip(ip, mask):  
     return f"IP: {ip}, mask: {mask}"  
show_me_ip('10.1.1.1', 24)

Thank you all for your supports.

Upvotes: 0

Views: 44

Answers (1)

George Imerlishvili
George Imerlishvili

Reputation: 1957

def show_me_ip(ip, mask):  
     return f"IP: {ip}, mask: {mask}"  
print(show_me_ip('10.1.1.1', 24))

Upvotes: 1

Related Questions