Code returns None when it shouldn't
Hello I'm still a newbie when it comes to Python, and I thought I had this challenge solved. However, whenever I run this code it returns the correct number, but it also appends None to them which then makes the result incorrect. Can anyone point out my mistake?
if len(arr) == 2:
return "%s %s" % (max(arr),min(arr))
x = sorted(arr)
y = x
z = x[(len(x)-1)-1]
print "%s %s" % (y,z)