We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
It could be arbitrarily long just by adding more and more layers of complexity.
But here's my submission that I just did for a bit of fun:
fromcollectionsimportnamedtupleLineLocation=namedtuple('LineLocation',['line','position'])if__name__=='__main__':rant="""Hacker Rank, What was it about your profile of me that gave you the Illusion that I would find this challenge an interesting, fun or useful programming task to complete? I agree, when learning a new language it can inform a new developer of the use of some features of its code. Whereas, even the dumbest analysis of my submissions should have shown you that time was long past in Python for me. I won't hold it against you however, for you have a truly handy website with lots of other challenging and fun distractions!"""lines=[line.strip()forlineinrant.split('\n')]locations=[LineLocation(z[0],z[1])forzinzip(lines,range(len(lines)))]chars=[loc.line[loc.position:loc.position+1]forlocinlocations]message=''.join(chars)printmessage
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Say "Hello, World!" With Python
You are viewing a single comment's thread. Return to all comments →
It could be arbitrarily long just by adding more and more layers of complexity.
But here's my submission that I just did for a bit of fun: