Python on Ubuntu

Felipe Alfaro Solana felipe.alfaro at gmail.com
Wed Sep 20 04:45:18 UTC 2006


> Next year ill be doing my Final Year project at University.
> Since i know many of the programing langs like java,C,C++,.NET i want to try
> out Python.

While Python is great, I've used to like Ruby much more than I like
Python. I think Ruby's syntax is more clear, and has some features,
like closures, that make me love it even more.

Ruby sample:

x = [ 1, 2, 3, 4, 5 ]
x.each { |i| print i }

What do you think this code does?

And this one?

File::open("sometextfile.txt").each { |l| print l.reverse }

Hint: You can install ruby and use "irb" (interactive Ruby) to check it out.




More information about the ubuntu-users mailing list