how to truncate to get the 1st 5 chars from a string

Discussion in 'Python' started by MacRules, Sep 24, 2009.

  1. MacRules

    MacRules Guest

    s="1234abcd"
    s.range(0..4)
    1234a

    Is there a string function like this?

    Thanks
     
    MacRules, Sep 24, 2009
    #1
    1. Advertising

  2. Grant Edwards, Sep 24, 2009
    #2
    1. Advertising

  3. MacRules

    Donn Guest

    Donn, Sep 24, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stimp
    Replies:
    2
    Views:
    665
    Stimp
    Oct 27, 2006
  2. Kosio

    Floats to chars and chars to floats

    Kosio, Sep 16, 2005, in forum: C Programming
    Replies:
    44
    Views:
    1,347
    Tim Rentsch
    Sep 23, 2005
  3. David C

    DirectoryExists on 1st 4 chars

    David C, Nov 16, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    324
    David C
    Nov 19, 2007
  4. Hongyu
    Replies:
    9
    Views:
    973
    James Kanze
    Aug 8, 2008
  5. M.Posseth

    receiving ??? chars instead of "special" chars

    M.Posseth, Nov 15, 2004, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    289
    Dan Rogers
    Nov 16, 2004
Loading...

Share This Page