[Python] Template literals f""

2021-01-02 16:29

阅读:700

标签:func   UNC   fun   ack   back   style   span   return   div   

The same as Javascript:

// Javascript
function sayHello(name) {
    return `Hello ${name}`
}

//python
def say_hello(name):
    return f"Hello {name}" 

 

[Python] Template literals f""

标签:func   UNC   fun   ack   back   style   span   return   div   

原文地址:https://www.cnblogs.com/Answer1215/p/12994453.html


评论


亲,登录后才可以留言!