Get an Object

Report a typo

You have a model Car with fields speed and color:

class Car(models.Model):
    color = models.CharField(max_length=32)
    speed = models.FloatField()

Get an object that has a green color. It's guaranteed that there's only one such car.

Write a program in Python 3
green_car = ...
___

Create a free account to access the full topic