May-03-2020, 08:23 AM
OK, thanks for the suggestions.
They confirm what i found, that the most "direct" way to do it,
is with a value "list" alongside the "dict". (That again is straightforward to make)
Then a simple def() will do the trick like so:
For those interested, if your conversion of '1999' comes out as 'MCMXCIX',
you're on the right track.
Paul
They confirm what i found, that the most "direct" way to do it,
is with a value "list" alongside the "dict". (That again is straightforward to make)
Then a simple def() will do the trick like so:
def previous_next(x): p = Rlist.index(x) prev = dictArabic[Rlist[p-1]] nxt = dictArabic[Rlist[p+1]] return nxt + prev # being strings like 'X' , or 'M'...(One could even do this in less lines of code.)
For those interested, if your conversion of '1999' comes out as 'MCMXCIX',
you're on the right track.
Paul