Try this;
import platform
os_name = platform.system()
os_name_strip = os_name.strip()
print('OS Name :', os_name_strip)
if os_name == 'Windows':
print('we have an OS match')
else:
print('we do not have an OS match')
OS Name : Windows
we have an OS match
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…