Count the number of characters without len() and combine the variables : <h1>Q1</h1>

<p>Write code that combines the following variables so that the sentence “You are doing a great job, keep it up!” is assigned to the variable message. Do not edit the values assigned to a, b, c, or d.</p>

<h1>Q2</h1>

<p>Count the number of characters in string str1. Do not use len(). Save the number in variable numbs</p>

<p>I've tried some solutions as below. I wonder if there any faster way to solve it? </p>

<h1>Q1</h1>

<pre><code>a = "You are"
b = "doing a great "
c = "job"
d = "keep it up!"


seq1 = [a, b]
seq2 = " ".join(seq1+[c])
message = ",".join(seq2 + [d])
</code></pre>

<p>Is there any more simple way to deal with the problem?
I hope I'm not hardcoding lol.</p>

<h1>Q2</h1>

<pre><code>str1 = "I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living."

list1 = list(str1)
print(list1)
numbs = count(list1)

print(numbs)
</code></pre>

<p>Should I use the count function like this in the code? Are there any modules or functions that I could apply? like loop function or Counter function?</p>

<p>Thanks in advance!</p>
