خرید بک لینک

Vote count: 0

TL;DR I want to know what is an option in Python, which might roughly correspond to the "-pe" option in Perl.

I used to use PERL for some time, but these days, I have been switching to PYTHON for its easiness and simplicity. When I needed to do simple text processing on the shell prompt, I had used perl -pe option. The following is an example.

grep foo *.txt | perl -pe 's/foo/bar/g'

To do a similar thing in Python, could someone explain to me how I can do this?

asked 50 secs ago

- - , .
.

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 27 تير 1395 ساعت: 11:06

صفحه بندی