Skip to main content
Commonmark migration
Source Link

#Python 159 153 bytes

Python 159 153 bytes

EDIT: Thanks @Pietu1998

This is a direct translation of the Javascript ES6 answer:

a=",I,You,He,We,They".split(',')
m="012345014444042242042345044444042545"
r=0
for p in raw_input().split('+'):r=int(m[int(m[a.index(p)])+r*6])
print a[r]

Try it here

#Python 159 153 bytes

EDIT: Thanks @Pietu1998

This is a direct translation of the Javascript ES6 answer:

a=",I,You,He,We,They".split(',')
m="012345014444042242042345044444042545"
r=0
for p in raw_input().split('+'):r=int(m[int(m[a.index(p)])+r*6])
print a[r]

Try it here

Python 159 153 bytes

EDIT: Thanks @Pietu1998

This is a direct translation of the Javascript ES6 answer:

a=",I,You,He,We,They".split(',')
m="012345014444042242042345044444042545"
r=0
for p in raw_input().split('+'):r=int(m[int(m[a.index(p)])+r*6])
print a[r]

Try it here

added 39 characters in body
Source Link
TanMath
  • 1.4k
  • 11
  • 25

#Python 159159 153 bytes

EDIT: Thanks @Pietu1998

This is a direct translation of the Javascript ES6 answer:

a=",I,You,He,We,They".split(',')
m="012345014444042242042345044444042545"
r=0
s=raw_input()
for p in sraw_input().split('+'):
 r=int(m[int(m[a.index(p)])+r*6])
print a[r]

Try it hereTry it here

#Python 159 bytes

This is a direct translation of the Javascript ES6 answer:

a=",I,You,He,We,They".split(',')
m="012345014444042242042345044444042545"
r=0
s=raw_input()
for p in s.split('+'):
 r=int(m[int(m[a.index(p)])+r*6])
print a[r]

Try it here

#Python 159 153 bytes

EDIT: Thanks @Pietu1998

This is a direct translation of the Javascript ES6 answer:

a=",I,You,He,We,They".split(',')
m="012345014444042242042345044444042545"
r=0
for p in raw_input().split('+'):r=int(m[int(m[a.index(p)])+r*6])
print a[r]

Try it here

Source Link
TanMath
  • 1.4k
  • 11
  • 25

#Python 159 bytes

This is a direct translation of the Javascript ES6 answer:

a=",I,You,He,We,They".split(',')
m="012345014444042242042345044444042545"
r=0
s=raw_input()
for p in s.split('+'):
 r=int(m[int(m[a.index(p)])+r*6])
print a[r]

Try it here

X