0

In Python3, When I try to read the input foo(1,?i:int) from console:

It gives syntax error! It can accept other inputs such as foo(1,2,2),foo('d',0).

def foo(*x):  #Multiple Argument function
  print(x)
Sumi
  • 11
  • 1
  • 1
  • 2
  • Maybe you want `"?i:int"` instead of unquoted one(`?i:int`)? – Lafexlos Oct 21 '16 at 06:59
  • No..The requirement is to read it as ?i:int, where ?: are symbols . Basically I have to give this input and then the function will check if the second parameter is int. Similarly, I should implement for str and float. Any help is greatly appreciated. @Lafexlos – Sumi Oct 21 '16 at 07:50

0 Answers0