Record seperator
D'Arcy J.M. Cain
darcy at druid.net
Fri Aug 26 15:02:21 EDT 2011
On 26 Aug 2011 18:39:07 GMT
greymaus <greymausg at mail.com> wrote:
>
> Is there an equivelent for the AWK RS in Python?
>
>
> as in RS='\n\n'
> will seperate a file at two blank line intervals
open("file.txt").read().split("\n\n")
--
D'Arcy J.M. Cain <darcy at druid.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.
More information about the Python-list
mailing list