String Concatenation In Python 3

preview_player
Показать описание
Be sure to like, share and comment to show your support for our tutorials.

=======================================
======================================

String Concatenation In Python 3

In this Python tutorial, we will explore how to do string concatenation in Python 3. There are situations where we would want to combine one or more strings together and this is called concatenation in programming. We can perform concatenation in Python by adding a plus(+) symbol between strings. When we concatenate you may want to plan ahead and add a space at the end of the original string or add a space at the beginning of the second string otherwise our strings will be combined with no space. Another solution would be to create another string that contains a space.
Рекомендации по теме
Комментарии
Автор

I keep getting a type error : " str object is not callable "


Here is my code:


num_1 = int(input('Please enter the first number:'))
num_2 = int(input('Please enter the second number:'))


print('The sum of ' + str(num_1) + ' and ' + str(num_2) + ' is ' + str(num_1 + num_2))

viritrilbiaslayerofargus.