0

How do i input a three digit number from the user and assign 3 different variables to the three digits:

>>> Numbers = int(input("Enter a 3 digit number : "))
Enter a 3 digit number : 411

now i want to assign the digits 4 to say x, 1 to y and 1 to z. Any tips?

hmm
  • 37
  • 8
  • Why are you trying to assign to different variables? – thefourtheye Mar 28 '15 at 04:47
  • I disagree that this simple Q is a duplicate of a complex Q about ISBN. Anyway, `x, y, z = str(Numbers)` answers this Q -- though I can only post it as a comment unless and until I can get this Q reopened!-) – Alex Martelli Mar 28 '15 at 05:24

0 Answers0