Taking input Python

for this, you can set the recursion limit bu following line :
sys.setrecursionlimit(10**6)

You need to provide an input type…
Like:
x = int(input())

thanks for the solution it worked like a charm
will it work for all the programs?

Yeah it worked

Its not working for me

it is just getting pass and doing nothing how do i handle the input man

please write the solution

Put try catch block and use custom inputs. Now run your program and submit.

thanks !!

thanks a lot !!! it really works … it resolved the EOF error in the Missing Point Question of July Challenge 2020

thanks it works

yes,should I WRITE SOLUTION IN a ITERATIVE APPROACH

Thank u dude it really worked

input() returns a string

so if you want to convert it to an integer then only int(iniput()) is used.

input() alone also works

thank you it works just fine

yaa same problem, this problem arises as codechef run our code with empty input. so use try: and except: method

worked, Ty dude ^>

not working, help, im using this code-
t=int(input())
for a in range (0,t):
n=int(input())
s=0
for temp in [int(x) for x in input().split()]:
s=s+temp
print(s)

custom input working all fine but throwing this error without custom input-
Traceback (most recent call last):
File “./prog.py”, line 1, in
EOFError: EOF when reading a line

1 Like

but this will execute every code…no matter what we have written…because it means if my code has any error then just pass…and that’s why it will not show error…after doing this it says “successfully executed” but this doesn’t mean our code is correct and giving the desired output…even if you write a song instead of your code it will get executed successfully.

1 Like

wowwww!! this works…