Write a program to remove spaces at the beginning and at the end of the string


Topic: Write a program to remove spaces at the beginning and at the end of the string

Solution

txt = "     banana     "
x = txt.strip()
print("of all fruits", x, "is my favorite")



List all Python Programs