This repository has been archived on 2021-10-31. You can view files and clone it, but cannot push or open issues or pull requests.
DSA/1st.py
2019-02-21 12:17:07 +01:00

16 lines
288 B
Python

#!/usr/bin/env python3
# vim: set ts=4 sw=4 et tw=80:
import sys
def find(A, x):
i = 0
while i < len(A):
if A[i] == x:
return i
i = i + 1
return None
if __name__ == "__main__":
A = [int(x) for x in sys.argv[1:]]
print(find(A[1:], A[0]))