What are the values of the following expressions?
In each line, assume that:
s = "Hello" t = "World"
len(s) + len(t)
To evaluate the expression len(s) + len(t)
given that s = "Hello"
and t = "World"
, we first need to find the lengths of the strings s
and t
.
s
("Hello") is 5.t
("World") is 5.Now, we can calculate the expression:
[ \text{len}(s) + \text{len}(t) = 5 + 5 = 10 ]
So, the value of the expression len(s) + len(t)
is **10