Many-to-many lookups

Report a typo

You have a Driver model with the field name, and a Car model with the fields color, drivers, and speed:

class Driver(models.Model):
    name = models.CharField(max_length=32)
        
class Car(models.Model):
    color = models.CharField(max_length=32)
    drivers = models.ManyToManyField(Driver)
    speed = models.FloatField

Find out how many cars Alex drives.

Sample Input 1:

Sample Output 1:

True
Write a program in Python 3
alex_cars_number = ...
___

Create a free account to access the full topic