Пример #1
0
 def __str__(self):
   return "Flight#: {0!s} Number of seats available: {1!s}\nTotal seats sold: {2!s}\nTotal revenue on this flight: ${3!s}\n\n{4!s}\n{5!s}\n".format(
     self.flightno, 
     len(self.available_seats), 
     len(self.passenger_manifest), 
     self.revenue,
     fmt.format("Passenger Name", "Seat#", "Price"), 
     "\n".join([str(p) for p in self.passenger_manifest.values()]))
Пример #2
0
 def __str__(self):
   return fmt.format(self.client.name, str(self.seat), "$" + str(self.price))