0
How to input a list that contains integer numbers on which arithmetic operations such as +,*,-,/ can be performed.
X=list(input("Enter a list:"))...this code enters a string...but I need numbers tat could be added or subtracted
2 Antworten
+ 1
Use int() function.
so your code will be :
X=list(int(input("Enter a list:")))
0
@Ali Reza Sorry bro I tried it...it's not working!