Last active
August 29, 2015 14:13
-
-
Save hasinhayder/3d0863dd2b1934441272 to your computer and use it in GitHub Desktop.
max.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
print max([2,3,4,5,1,2,11,2,8,3,10]) | |
def max(nums): | |
_max=nums[0] | |
for n in nums: | |
_max = _max if (_max>n) else n | |
return _max | |
if __name__ == "__main__": main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment