Apr-23-2017, 06:34 PM
(Apr-23-2017, 06:17 PM)micseydel Wrote:(Apr-23-2017, 06:10 PM)idontreallywolf Wrote:That behavior would cause the prompt to happen twice, so it would be like you were asking for four numbers.a, b = input("Enter two numbers> "), input("Enter two numbers> ")
(Apr-23-2017, 06:10 PM)idontreallywolf Wrote:As the list there shows, it's a list of strings, not ints. Another step is required to turn the strings into ints.a = input("Enter two numbers> ")
a = a.split(' ')
# a becomes a list of 2 integers ['1', '2']
Indeed, I have forgotten to edit the text inside.
isn't it obvious that the last step requires conversion from str to int?