Unknown number of key arguments


#1

'''x, k = map(int, raw_input().split())
p = raw_input()
p = p.replace("x", "%s")
a = (p) % (x,x,x,x)
b = eval(a)
if b == k:
    print 'True'
else:
print 'False'
'''

<Here is the error prompt:
Traceback (most recent call last):
File "solution.py", line 5, in
a = (p) % (x,x,x,x)
TypeError: not all arguments converted during string formatting

I dont know how many x I would put because it is based on the user input. Is there any way to solve this?>


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.