actually if you had switched the positions of the 2 conditions above you would be fine, because then python would evaluate str1!='' first, and skip the str1[-1] once the first is not satisfied (ie. if str1 is empty). The error here occurred because it was trying to get the last character in an empty string
yeah he better hope nobody catches him while he stands there trying 100+ combinations on this bad security system lol
str1[-1] == ' ' and str1 != ''
actually if you had switched the positions of the 2 conditions above you would be fine, because then python would evaluate str1!='' first, and skip the str1[-1] once the first is not satisfied (ie. if str1 is empty). The error here occurred because it was trying to get the last character in an empty string
nope, only the contests ;)