Answer to Question #297895 in Python for WXYZ

Question #297895

Number Game


write a program to print the following


Input

The first line input containing the comma separated integers.

The second line of input is integer.


Sample Input1

1,2,3

1

Sample Output1

2 3

1 2


1
Expert's answer
2022-02-15T08:17:17-0500
a, b = map(int, input("Enter two values\n").split(', '))
print("\nThe value of a is {} and b is {}".format(a, b))
  
# Taking 3 inputs
a, b, c = map(int, input("Enter three values\n").split(', '))
print("\nThe value of a is {}, b is {} and c is {}".format(a, b, c))
  
# Taking multiple inputs
L = list(map(int, input("Enter multiple values\n").split(', ')))
print("\nThe values of input are", L)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS