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
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)
Comments
Leave a comment