adamacantwell
adamacantwell

Reputation: 11

How can I assign an inputted string value to a variable?

x = input("Enter roman numberal:")

I need to enter one roman numeral as a string and return the value. When I run the code above, I get that whatever I enter in as the string isn't defined. I just want x to represent the inputted string, what am I doing wrong?

I am using Python 2.7.3.

Upvotes: 0

Views: 68

Answers (1)

wrdeman
wrdeman

Reputation: 820

Use raw input

X = raw_input('enter value?')

Upvotes: 1

Related Questions