help! dunno how to convert this in python.. 'contains == ???' in python

if (basket contains "fruits") then
try
	tell application "Document" to tell application "System Events" to tell application process "Document" to click button "Cancel" of sheet 1 of window "Untitled"
	tell application "Document" to quit saving no
end try

basket has for example 5 elements..


thanks