+ 3

What is the difference between Ruby and Python?

Print as output

9th Feb 2018, 11:24 AM
Ya'u Muhammad Zangina
Ya'u Muhammad Zangina - avatar
3 Answers
+ 6
print "this" ->Ruby print("this")->Python
9th Feb 2018, 11:25 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 2
@ Pegasus but prior to Python3 even python had same print as ruby but in py3 the print operator was tuned into function and one more thing the print equivalent of ruby is puts because print in ruby doesn't print a new line at the end. For example:- In Ruby---> print 'one' print 'two' # output onetwo In Python 3 ---> print('one') print('two') # output # one # two
9th Feb 2018, 12:15 PM
OR!ON 🛡️
OR!ON 🛡️ - avatar
0
Thanks
9th Feb 2018, 11:28 AM
Ya'u Muhammad Zangina
Ya'u Muhammad Zangina - avatar