sorting
Jeff McComas
jmackd1 at yahoo.com
Thu Feb 28 09:22:10 EST 2002
As a newbie i find the python scripting language very interesting and useful.
I am trying to write a script that will search a .txt file and have the script
tell me how many of the same numbers are in the .txt file. I know you can do
it with the f.count command but my problem is how can you do an input that
makes the numbers strings? Or puts double quotes and a comma around a number?
This is what a raw input from a .txt file looks like:
34.6 25 78 89.2 45.7
23 92 47 20 85
56 78 23 49 92
out of that how can i pull out the numbers that are the same, say 78 = 2
Any help would be appreciated!
Thanks,
Jeff McComas
Austin, TX
More information about the Python-list
mailing list