Enumerating words and Adding integer, character and string

Discussion in 'Python' started by dont bother, Mar 6, 2004.

  1. dont bother

    dont bother Guest

    1. How do I make a vector of words in a file.
    Ex:
    File has

    Alpha
    Beta
    Gamma

    I want to have this file:
    1 Alpha
    2 Beta
    3 Gamma

    I just dont want to write it/print it instead I want a
    mapping. A vector kind of thing whose first attribute
    is interger second is the 'word'


    2. How to I create a string for example by adding:

    s=1 + ":" + "dont"

    this does not work if I normally try to concatenate
    and write to a file.

    Any help is appreciated
    Thanks
    Dont

    __________________________________
    Do you Yahoo!?
    Yahoo! Search - Find what you’re looking for faster
    http://search.yahoo.com
     
    dont bother, Mar 6, 2004
    #1
    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. Brand Bogard

    8 bit character string to 16 bit character string

    Brand Bogard, May 25, 2006, in forum: C Programming
    Replies:
    8
    Views:
    748
    those who know me have no need of my name
    May 28, 2006
  2. BerlinBrown
    Replies:
    6
    Views:
    4,646
  3. Randy Kramer
    Replies:
    12
    Views:
    387
    Robert Klemme
    Oct 25, 2007
  4. pantagruel
    Replies:
    8
    Views:
    465
    Dr John Stockton
    Jul 22, 2006
  5. Bart Vandewoestyne
    Replies:
    8
    Views:
    762
    Bart Vandewoestyne
    Sep 25, 2012
Loading...

Share This Page