Yes, string manipulation in Python refers to any operation that changes, processes, or formats strings โ including:
Concatenation (+)
Slicing (s[0:4])
Replacing (s.replace())
Formatting (f"Name: {name}")
Adding escape characters like \n
๐งช Example:
info = "Name: Abbas\nSex: Male"
print(info)
Output:
Name: Abbas
Sex: Male
โ๏ธ Adding \n is string manipulation โ it changes how the string is structured or displayed.
In short: Yes, \n and actions like concatenation are string manipulations.