View Single Post
Posts: 28 | Thanked: 13 times | Joined on Nov 2010 @ Tampere, Finland
#5
Originally Posted by khuong View Post
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.
 

The Following User Says Thank You to mvuori For This Useful Post: