import csv
s = [1.0, 4.0, '10.04.2017 0:16:32', '7772CY01']
with open('eggs.csv', 'w', newline='') as csvfile:
spamwriter = csv.writer(csvfile, delimiter=';',
quoting=csv.QUOTE_MINIMAL)
spamwriter.writerow(s)
class redFigure():
color = 'red'
def __init__(self,x,y):
self.x = x
self.y = y
class Pawn(redFigure):
step_type = 'xy'
def __init__(self,x,y):
super().__init__(x,y)
pawn = Pawn(0,0)
print(isinstance(pawn,redFigure)) #Ваша проверка на цвет if figure == "red": #
print(pawn.color, pawn.x,pawn.y)