Learn practical skills, build real-world projects, and advance your career

The task is to find the sum of alternate numbers raised to the power of their next number. For example, for the below example the result should be 2 ** 5 + 3 ** 1 = 35.

str = '''2
5
3
1'''
str2 = '''a
b
c
d
e
f'''

if there are 6 rows then the result will be a** b + c** d + e**f

import jovian