hsfl.net
当前位置:首页 >> lEArn ruBy >>

lEArn ruBy

File.read("jobs_speech.txt").gsub(/[^A-Za-z]/,' ').split(/\s+/).inject({}) { |h, w| h[w.upcase] ||=0 h[w.upcase] += 1 h }.sort_by { |k, v| -v }.each { |w, f| puts "#{w}: #{f}"}

网站首页 | 网站地图
All rights reserved Powered by www.hsfl.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com