2/13/2019 10:30:10 PM
thisisforthatj1 Answer
New AnswerBuilt-in function and built-in types are built into the interpreter and are always available. You don't need to write any code that returns the max value in a list, you can use the built-in function "max()" instead. Since they are not keywords, you can override them. You can declare a variable named "max", but then you no longer will be able to use it as before. e.g. my_list = [1, 2, 3] print(max(my_list)) max = 5 print(max) print(max(my_list)) >>> 3 >>> 5 >>> TypeError TypeError because "max" is now an integer variable that contains the value "5".
Learn Playing. Play Learning
SoloLearn Inc.
4 Embarcadero Center, Suite 1455Send us a message