Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Enumerating words and Adding integer, character and string

Reply
Thread Tools

Enumerating words and Adding integer, character and string

 
 
dont bother
Guest
Posts: n/a
 
      03-06-2004
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert string with control character in caret notation to realcontrol character string. Bart Vandewoestyne C Programming 8 09-25-2012 12:41 PM
Re: Words and non-words, according to Microsoft et al Steve B NZ Computing 11 03-21-2008 11:52 PM
Replace stop words (remove words from a string) BerlinBrown Python 6 01-17-2008 02:37 PM
split camelcase string into array of words words pantagruel Javascript 8 07-22-2006 07:46 PM
8 bit character string to 16 bit character string Brand Bogard C Programming 8 05-28-2006 05:05 PM



Advertisments