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.
I am new to python & your solution was easiest to undertstand. I tried it and it worked fine. But i was not able to understand this part "lis.insert(int(s[1]),int(s[2]))". They asked us to insert 5 at 0 index, but by using this command we are inserting both the integers, right? Or if it is otherwise, can you pls explain?
Thank You
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Lists
You are viewing a single comment's thread. Return to all comments →
Hey @roy15_5722,
I am new to python & your solution was easiest to undertstand. I tried it and it worked fine. But i was not able to understand this part "lis.insert(int(s[1]),int(s[2]))". They asked us to insert 5 at 0 index, but by using this command we are inserting both the integers, right? Or if it is otherwise, can you pls explain?
Thank You