So I tried to swap the first characters of the strings. Fresh > Nresh and Not fresh > Fot fresh, what am I doing wrong here? I got this error message: string_A[0] = string_B[0:1] TypeError: 'str' object does not support item assignment
Here my code:
string_A = "Fresh"
string_B = "Not fresh"
placeholder = string_A[0]
string_A[0] = string_B[0]
string_B[0] = string_A[0]
print(string_A)
print(string_B)