Created
September 13, 2018 11:07
-
-
Save manojnaidu619/26f52b71f6b50ebebde036b2397345e9 to your computer and use it in GitHub Desktop.
Converts User Input to array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arr = Array.new # New array Object | |
a = gets | |
a.each_char{|e| arr.push(e)} # Push each element to array | |
arr.pop | |
p arr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment