How can use a variable in an input statement and print a comma after a variable with no space?
Posted on 2014-08-16
Is there a way to use a variable in an input statement such as miles = int(input(name, 'How many miles to be converted to kilometers?: ')). When I tried this I got TypeError: input expected at most 1 arguments, got 2.
Also, I have print(name,'the conversions for your data are as follows: \n') and I would like to put a comma after name which is a variable without a space. I've tried name, ',' + 'the conversions for your data are as follows: \n', but I get a space between name and the comma.