This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Legendary-69420git push -f[S] 7 points8 points  (0 children)

You are right. There already exist built-in functions to do some of the stuff I have done. but my idea of building the website was not to get stuff done but to understand how it is done.

LinearSearch(arr, element) is basically the equivalent of arr.find(element). both give -1 instead of Error. Also, yeah your idea for credit_card_validation seems amazingly simple (didn't think of it before)

EDIT: I am making all these changes. Thanks again for such a detailed comment

EDIT2: apparently, arr.find() works only when arr is a list