Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7884713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:52:28+00:00 2026-06-03T04:52:28+00:00

I want to write a code in DrRacket that accepts a multiple words from

  • 0

I want to write a code in DrRacket that accepts a multiple words from the command prompt and does converts them to a list of string. For eg. if I enter hello how do you do in the prompt, it should convert it into a list ‘(“hello” “how” “do” “you” “do”). Is it possible in DrRacket?

i tried this:
(define inp-lst (read))

On running this code, an input bar is shown in the command promt. but when i enter the above line, the value of inp-lst turns out to be just ‘hello. Can someone help?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:52:30+00:00Added an answer on June 3, 2026 at 4:52 am

    As a first step, type your input between quotes, like this:

    (define inp-lst (read))
    "hello how do you do"
    

    Now, you can create a list of strings doing this:

    (regexp-split #px" " inp-lst)
    > '("hello" "how" "do" "you" "do")
    

    EDIT :

    As has been pointed out in the comments, read-line might be a better alternative:

    (define inp-lst (read-line))
    (regexp-split #px" " inp-lst)
    > '("hello" "how" "do" "you" "do")
    

    Using read-line, you don’t need to surround the typed text with quotes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to write a code that transfers data from on server to my
I want to write a parallel code that works on a 3D matrix where
I want write jquery code that will show form inputs after a checkbox is
I want to write code that compiles easily for either 32 or 64 bit
I want to write code that compiles conditionally and according to the following two
I want to write code in Ruby witch net::ssh that run commands one by
I want to write the code that will output : length [1,2,3] => 3
I want to write code like this: command="some command" safeRunCommand $command safeRunCommand() { cmnd=$1
Extremely just-started-yesterday new to F#. What I want: To write code that parses the
I want to write code that best uses the cache memory of my system.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.