Wrapping f-string according to PEP
📁 Advanced Python Topics, question
I decided to follow code style guidelines and encountered a problem with how to properly wrap lines and expressions in Python.
def get_message(self) -> str: retu f'Training type: {self.training_type}; Duration: {self.duration:.3f} h.; Distance: {self.distance:.3f} km; Avg. speed: {self.speed:.3f} km/h; Calories burned: {self.calories:.3f}.'
Using Computer Vision Library for image generation is... strange. Better use
from PIL import Imageimg = Image.new('RGB', (250, 250), (255, 255, 255))img.show() Log in to leave an answer