give me shorter version of `def bake_time(time): return 40 - time` in python

To shorten the bake_time function, you can use a lambda function. Here's the shorter version of the function:

main.py
bake_time = lambda time: 40 - time
35 chars
2 lines

This is an example of an anonymous function that takes one argument time and returns the result of subtracting time from 40.

related categories

gistlibby LogSnag