擅长:python、mysql、java
<p>您正在尝试将<code>int</code>添加到<code>str</code>中,因此在连接之前可以将其转换为字符串</p>
<pre><code>print(str(year-birth) + ' that is your age')
</code></pre>
<p>或者使用<code>str.format</code></p>
<pre><code>print('{} that is your age'.format(year-birth))
</code></pre>
<p>或者使用和f-string</p>
<pre><code>print(f'{year-birth} that is your age')
</code></pre>