Get This Python App. HERE
Posts

String Operations

String Operations in Python

Python Program Free Online Course
String Operations in Python
Concatenation

As with integers and floats, strings in Python can be added, using a process called concatenation, which can be done on any two strings.

print('Spam' + "eggs" + 'bacon' + 'sausage' + "spam")

Even if your strings contain numbers, they are still added as strings rather than integers.

print("2" + "2" + "4")

Adding a string to a number produces an error, as even though they might look similar, they are two different entities.

RUN

Post a Comment

© Free Python Course . All rights reserved. Distributed by Template.vuinsider.com