-1

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)
quamrana
  • 37,849
  • 12
  • 53
  • 71

1 Answers1

1

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

Ofek Glick
  • 999
  • 2
  • 9
  • 20