You are viewing a single comment's thread. Return to all comments →
why this code isn't accepted?
print(*[str(i) for i in range(1,i+1)], *[str(i) for i in range(i-1,0,-1)], sep = '')
or this print(*range(1,i+1), *range(i-1,0,-1), sep = '')
in task description nothing said about that returned value should be integer
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Triangle Quest 2
You are viewing a single comment's thread. Return to all comments →
why this code isn't accepted?
print(*[str(i) for i in range(1,i+1)], *[str(i) for i in range(i-1,0,-1)], sep = '')
or this print(*range(1,i+1), *range(i-1,0,-1), sep = '')
in task description nothing said about that returned value should be integer