![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Newbie
Join Date: Aug 2004
Location: Florida
Posts: 11
Rep Power: 0
![]() |
exactly B)
plus there is lots of code out there to read through to get an idea of how it should and should not be written. I think one of the neatest things about the language is the ability to slurp a file into an array according to the lines in the file in two or three lines of code. Can't do that in C .... C++, yes, if you use the STL, but even then, it's not as clean and understandable. Plus you can filter the lines that you want in the same operation in Python -- that I know you can't do with C++. ex. import re r = re.compile('^MyMatch', re.IGNORECASE) f = open('my.dat', 'r') lines_I_want = [ x for x in f if r.match(x) ] f.close() sweeeeeet ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|