Len function retur always 0

I think that’s true, but (a bit like posting screenshots) it will get fewer responses than in the majority language.

@sergio6 : The argument to the input function is the prompt, that is the instruction you want to give the user. It is usually a string (text), like this:

>>> two_digit_number = input("Give me a number:")
Give me a number:

Then it waits.

In your case, Python has printed your prompt “32”, but it looks like you entered nothing, that is, you entered an empty string. If you had entered a two digit number, it would have gone like this:

>>> two_digit_number = input("Give me a number:")
Give me a number:42
>>> two_digit_number
'42'

Postscript: If you follow the advice in the pinned thread, your code will come out like the above. That means you can copy and paste it. (Don’t copy the prompts.)

1 Like