I have just started learning Python. I am trying to have the user input a number base, and a number, and convert that to decimal.
I've been trying to use the built in int function like this:
base = raw_input("what number base are you starting with? \n")
num = raw_input("please enter your number: ")
int(num,base)
My problem is that when you use that int function, the number your converting needs to be in quotes like so: int('fff',16)
How can I accomplish this when im using a variable?
str(number), for examplestr(10)will return'10'.