SyntaxError: invalid syntax - Python 3.5 [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I have a small code in Python, which looks like that: import sys def _158a(): n, k = map(int, sys.stdin.readline().split()) data = input().split() a=[] for i in range(n): a.append(int(data[i])) ans=0 for i in range(n): if a[i]>=a[k-1] and a[i]: ans+=1 return ans res = _158a() print(res) with input from keyboard: