简体   繁体   English

函数内的 f-string 中的问题

[英]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 :我在函数中有这个 f-string 的 baaasic 脚本,我想知道为什么我运行它时没有返回结果:

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.谢谢大家的支持。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM