aboutsummaryrefslogtreecommitdiff
path: root/challenge-182/lubos-kolouch/python/ch-1.py
diff options
context:
space:
mode:
author冯昶 <fengchang@novel-supertv.com>2023-08-07 15:12:39 +0800
committer冯昶 <fengchang@novel-supertv.com>2023-08-07 15:12:39 +0800
commit6ef46b171c093a7fc72e6b52662b9020fe71753a (patch)
treec69b365edfce5a183ad3e2aeb9f667f8885c3589 /challenge-182/lubos-kolouch/python/ch-1.py
parentcb5bb2d77bf43ab282150372f5cd87bbbcb7a477 (diff)
parent2b2c6ec6ece04737ba9a572109d5e7072fdaa14a (diff)
downloadperlweeklychallenge-club-6ef46b171c093a7fc72e6b52662b9020fe71753a.tar.gz
perlweeklychallenge-club-6ef46b171c093a7fc72e6b52662b9020fe71753a.tar.bz2
perlweeklychallenge-club-6ef46b171c093a7fc72e6b52662b9020fe71753a.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'challenge-182/lubos-kolouch/python/ch-1.py')
-rw-r--r--challenge-182/lubos-kolouch/python/ch-1.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/challenge-182/lubos-kolouch/python/ch-1.py b/challenge-182/lubos-kolouch/python/ch-1.py
new file mode 100644
index 0000000000..373f34c2c8
--- /dev/null
+++ b/challenge-182/lubos-kolouch/python/ch-1.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+
+def max_index(lst):
+ return lst.index(max(lst))
+
+
+print(max_index([5, 2, 9, 1, 7, 6])) # Output: 2
+print(max_index([4, 2, 3, 1, 5, 0])) # Output: 4