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.
Hi @aindl, for string type putStrLn should be preferred. While for non-string types you need to convert it into a string and then use putStrLn on it, and print is doing that for us. Check the difinition of print
print = putStrLn. show
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Hello World
You are viewing a single comment's thread. Return to all comments →
Hi @aindl, for string type
putStrLn
should be preferred. While for non-string types you need to convert it into a string and then useputStrLn
on it, andprint
is doing that for us. Check the difinition of print