Ex 9 Ruby Multi-line


In Ex9 the example in the book is:

1 puts %q{
2 Text 
3 Text
4 }

In the Ex9 video it’s like Python The Hard Way:

1 puts """
2 Text
3 Text
4 """

Both work in Ruby. Is there a difference? Will the Python way go away in Ruby? Google keeps taking me to StackOverflow links. Thanks


That’s a mistake on my part. I believed that Ruby had a similar syntax, and had read that in a few places, and used that for years, but apparently that’s not actually ruby syntax. So, go with the book.