Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.advocacy > #409530
| From | owl <owl@rooftop.invalid> |
|---|---|
| Newsgroups | comp.os.linux.advocacy |
| Subject | Re: BOOM! |
| Date | 2017-04-19 17:50 +0000 |
| Organization | O.W.L. |
| Message-ID | <azjb00ag.au8@rooftop.invalid> (permalink) |
| References | (9 earlier) <od2rpl$8vj$2@dont-email.me> <f9417bac-785f-4276-bedd-6ed02050b64b@googlegroups.com> <od3isf$n13$6@dont-email.me> <57cfe7f9-4994-411a-b8d0-fbfdc5f5ec93@googlegroups.com> <od7p8i$ln6$3@dont-email.me> |
DFS <nospam@dfs.com> wrote:
> On 4/17/2017 8:21 PM, Steve Carroll wrote:
>
>
>> I just can't get used to that syntax...
>
> eh? It doesn't get any simpler:
>
>
> * print "a piece of text"
>
printf "a piece of text\n"
echo "a piece of text"
> * for i in range(start,stop,step):
> do something
>
for i in $(seq start step stop); do something; done
> * list.append(value)
>
words+=(five six)
> * db.execute("SELECT COLUMN1, COLUMN2 FROM TABLE;")
> for col1, col2 in db.fetchall():
> print col1, col2
> do things with the data
>
psql -t -c "select ..."
>
> And list comprehension is a small miracle; just 1 line to count letters:
>
> msg = "Now is the time for all 123 good men to come to the aid of their
> country."
> for letter, cnt in sorted(set([(x,msg.count(x)) for x in msg if
> x.isalpha()])):
> print letter, cnt
>
grep -o . |grep '[a-zA-Z]'|sort|uniq -c
Back to comp.os.linux.advocacy | Previous | Next — Previous in thread | Next in thread | Find similar
Re: BOOM! DFS <nospam@dfs.com> - 2017-04-17 19:28 -0400
Re: BOOM! Steve Carroll <fretwizzer@gmail.com> - 2017-04-17 17:21 -0700
Re: BOOM! DFS <nospam@dfs.com> - 2017-04-19 09:41 -0400
Re: BOOM! fr314159@gmail.com - 2017-04-19 07:48 -0700
Re: BOOM! DFS <nospam@dfs.com> - 2017-04-19 14:21 -0400
Re: BOOM! Snit <usenet@gallopinginsanity.com> - 2017-04-19 11:36 -0700
Re: BOOM! owl <owl@rooftop.invalid> - 2017-04-19 20:03 +0000
Re: BOOM! DFS <nospam@dfs.com> - 2017-04-19 16:24 -0400
Re: BOOM! Steve Carroll <fretwizzer@gmail.com> - 2017-04-19 08:37 -0700
Re: BOOM! owl <owl@rooftop.invalid> - 2017-04-19 17:50 +0000
Re: BOOM! DFS <nospam@dfs.com> - 2017-04-19 14:32 -0400
csiph-web