require 'csv' words = CSV.read("new2.csv", headers:true) x = jp[rand(jp.length)] printf("%s,%s\n",x,)