昊天SEO

练习8:打印,打印–笨方法学ruby在线

formatter = "%s %s %s %s"

puts formatter % [1, 2, 3, 4]
puts formatter % ["one", "two", "three", "four"]
puts formatter % [true, false, false, true]
puts formatter % [formatter, formatter, formatter, formatter]
puts formatter % [
   "I had this thing.",
   "That you could type up right.",
    "But it didn't sing.",
    "So I said goodnight."
]

未经允许不得转载:新乡seo|网站优化,网站建设—昊天博客 » 练习8:打印,打印–笨方法学ruby在线

网站的维护离不开大家的支持鼓励,捐赠让我更有动力走的更远&& 也可以关注我的微信公众号,发布更多的干货
本文网址:https://www.168seo.cn/ruby/rubyben/2341.html

相关推荐