For example I couldn't figure out how to find the minimum value in the list called "cars" by simply printing out print min(cars) however making variable called X worked
cars = range (1,101)
x = sum(cars)
print( x)
For example I couldn't figure out how to find the minimum value in the list called "cars" by simply printing out print min(cars) however making variable called X worked
cars = range (1,101)
x = sum(cars)
print( x)
In python you can use the built-in functions max
,min
or sum
to print the value of each method.
There is not need to assign it to a variable.
For instance, doing print(max([1,2,3,4]))
will print 4