문제

I've started learning Python and I was wondering if there is a way to do the opposite of trim() in Python. For example I have string: "Need some help around here" and I want it to become " Need some help around here "?

도움이 되었습니까?

해결책

No, strip() removes all the space in the head and tail. But you can

' %s ' % 'Need some help around here'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top