CopyofExercise:SheetsOperationonStrings

CopyofExercise:SheetsOperationonStrings - student project

Question:

2. Using string slicing, what is a way you could get rid of the extra space at the end of the
following statement?
tooManySpaces = "Spaceman "*2

 

My answer:

str = "Spaceman "

print(str[0:8])

Tiffany Milkhannie

Artisan by birth