använda boolean för att hantera strängar i python