0
0

More than 1 year has passed since last update.

paizaラーニング「何番目にある? 1 Python3編」

Posted at

私の解答

li = [1, 10, 2, 9, 3, 8, 4, 7, 5, 6]
for i in range(len(li)):
    if li[i] == 8:
        print(i + 1)

ほぼ同じになりました。

解答例

li = [1, 10, 2, 9, 3, 8, 4, 7, 5, 6]

for i in range(len(li)):
    if li[i] == 8:
        print(i + 1)
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