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 692029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:36:28+00:00 2026-05-14T02:36:28+00:00

hay all, I just did the following: a = input(give a word: ) b

  • 0

hay all, I just did the following:

a = input("give a word: ")
b = input("give another word: ")

c = a + " " + b

print("result is", c)

and get the output as follows:

give a word: name
give another word: word
result is name
word

my question is why the output on pydev or eclipse console in two lines? i expected to output as follows:

give a word: name
give another word: word
result is name word

how and why this happens to me? on cmd its looking fine??!!

also i found that python saves the strings with “\r”, i think that is the one making this problem on pydev console, is it?

  • 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-05-14T02:36:29+00:00Added an answer on May 14, 2026 at 2:36 am

    It seems to me that Eclipse + PyDev is storing the newline character in the string as well. There are a few variants of the newline character depending on the operating system: \n, \r, \r\n.

    In any case, I think the following should fix your problem:

    a = raw_input("give a word: ").strip()
    b = raw_input("give another word: ").strip()
    c = a + " " + b
    

    I have tested this code on PyDev for Eclipse Galileo on Windows7 and it works.

    Hope this helps

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

Sidebar

Related Questions

Hay All, I cant seem to get my head around this dispite the number
Hay all im using a simple look to get file names from a dir
Hay All Can we get the hard-disk number using php or C Is there
Hay all, I've been reading up on middleware and how to use it with
Hay guys, i want to use something like this users = User.objects.all() but i
Hay, serializers is not returning JSON object make = Make.objects.filter(slug__exact=make) models = Model.objects.filter(make=make).values('slug','name') json_models
hay all, I want to enter url in one view and then want to
Hay, is it possible to a get a request.session value from a model method
Hay All. I'm currently working on a 'checkout' system, the actual payment and stuff
Hay all, i need help making a regex. The string must contain a -

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.