I don't know if I can't find my problem, or I'm just getting my keywords wrong when searching for a solution, but I can't solve it.

I'm getting problems with adding values to lists, here is my code:

a=raw_input ("Hello, add your first database entery")
b=raw_input ("Hello, add your second database entery")
c=raw_input ("Hello, add your third database entery")
d=raw_input ("Hello, add your fourth database entery")
print (x)

Upon entering; 1,2,3,4 for the questions, I get this output:

What's with the u'x' I'm getting?

unicode string literals.

If you tell what is problem,I do not see any.

Sorry, I didn't phrase it correctly. I'd just like to stop showing the 'u' before each value in the list. Thanks :)

Why you do not print each value in list or join list values and print the string?

# back port input as raw_input if we run Python2
    input = raw_input

x = [input ("Hello, add your %s database entery: " % count) for count in ('first', 'second', 'third')]
print(', '.join(x))
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.