+ 1
Where is the bug?
Why it outputs an error? sentence = lambda name: "Hello,", name print(sentence("Jakob")) https://sololearn.com/compiler-playground/chE9gTsNZeHl/?ref=app
5 Réponses
+ 1
You need to do string interpolation.
sentence = lambda name: f"Hello, {name}"
+ 1
You can also put 2 strings together:
sentence = lambda name: "Hello, " + name
+ 1
Why do I have to do that? In the course they don't do it.
0
You will learn about putting strings together and about string interpolation in the Python Intermediate course.