Thread
:
Need help with python string trim
View Single Post
mvuori
2011-04-02 , 18:33
Posts: 28 | Thanked: 13 times | Joined on Nov 2010 @ Tampere, Finland
#
5
Originally Posted by
khuong
Thank you very much
Will this be correct?
newstr = str[:strlen]
Why don't you just try it. The whole point of Python is that it is an interpreted language, which makes it fast to try code snippets.
If you need to ask if a one line piece of code is ok or not, you will never get a Python program to work.
Quote & Reply
|
The Following User Says Thank You to mvuori For This Useful Post:
Mentalist Traceur
mvuori
View Public Profile
Send a private message to mvuori
Find all posts by mvuori