Python
print("I'm {name}. {age} old.".format(name="Hogeo", age=3)) #-> I'm Hogeo. 3 old.
Javascript
console.log( "I'm {name}. {age} old.".replace( /\{(\w+)\}/g, function(m, k) { return { "name":"Hogeo", "age":3 }[k]; } ) ); //-> I'm Hogeo. 3 old.
牌語備忘録 -pygo
print("I'm {name}. {age} old.".format(name="Hogeo", age=3)) #-> I'm Hogeo. 3 old.
console.log( "I'm {name}. {age} old.".replace( /\{(\w+)\}/g, function(m, k) { return { "name":"Hogeo", "age":3 }[k]; } ) ); //-> I'm Hogeo. 3 old.