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.
for the variables of my dimensions, but then I realized that it is possible to be given only 2 dimentions. Which would then cause an error. So instead of assigning 3 separate variables I took the whole input line and created a tuple d and used pass this tuple as the dimentions when creating the ones and zeros.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Zeros and Ones
You are viewing a single comment's thread. Return to all comments →
Newbie Code
At first I used :
for the variables of my dimensions, but then I realized that it is possible to be given only 2 dimentions. Which would then cause an error. So instead of assigning 3 separate variables I took the whole input line and created a tuple d and used pass this tuple as the dimentions when creating the ones and zeros.