0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

技術英語 > We are running a loop over each of the seven letters in the string 'letters' / cycle over each of the menu links

Last updated at Posted at 2017-03-12

@ Introducing Python: Modern Computing in Simple Packages by Bill Lubanovic
(No. 2366 / 12833)

word = 'letters'
letter_counts = {letter: word.count(letter) for letter in word}
print(letter_counts)
結果
{'s': 1, 'r': 1, 'e': 2, 'l': 1, 't': 2}

Pythonのdictionary comprehensions。

We are running a loop over each of the seven letters in the string 'letters'

意訳「7文字のそれぞれに対して、string 'letters'の走査を行う」

これを自分で英訳できるか微妙だ。overがeach of the にかかるようには自分では思いつかない。

We are runnig a loop for each of the seven letters in the string 'letters' over the string.
だろうか。冗長な気もする。


(追記 2017/03/13) over each of theの他の例

how to use the method we used to cycle over each of the menu links.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?