PDA

View Full Version : Python - Removing first 10 characters of a string



Mithrilhall
January 6th, 2007, 03:44 AM
I'm sure this is easy but I'm new to python so here's my question.

How can I trim the first 5, 10, 20, or x characters of a string?

meng
January 6th, 2007, 03:45 AM
When you're new to a language and you have a problem, it's good to share your initial thoughts. Have you had any? Otherwise you may just get into the habit of getting answers spoonfed to you, and you won't learn anything.

Mithrilhall
January 6th, 2007, 03:53 AM
*snip*

An I personally think the documentation I've found on the web for Python isn't very good....but hey...thanks for the helpful post. LOL

gpolo
January 6th, 2007, 03:54 AM
nicestring[x:]

meng
January 6th, 2007, 03:55 AM
*snip*

An I personally think the documentation I've found on the web for Python isn't very good....but hey...thanks for the helpful post. LOL
Thanks man! It's a real accolade to receive such a response from you. I'm sure someone will give you the answer soon.
EDIT: there you go!

Mithrilhall
January 6th, 2007, 03:57 AM
I'm not to worried about getting a helpful response. Most of the people I've seen on the forums here are your typical response to people's inquiries....but hey..keep up the great work. :mrgreen: