spacepaste
new
Paste details
reply
|
raw
def
adjacentElementsProduct
(
inputArray
):
x
=
0
y
=
2
lastIndex
=
len
(
inputArray
)
-
1
for
i
in
range
(
lastIndex
):
(
first
,
second
)
=
inputArray
[
x
:
y
:
1
]
x
=
x
+
1
y
=
y
+
1
productArray
=
[]
productArray
.
append
(
first
*
second
)
return
max
(
productArray
)