Chanakya Mitra wrote: [simulacrx] > c=set(a).intersection(set(check))
[Chanakya Mitra] > shouldn’t this be: > c=set(a).issubset(set(check)) > ? > set(a).intersection(set(check)) will be true as long as only one element > appears in both. ie. 15/a8 kill the process and spit out an error instead > of asking "error! please use -defined operators-!" You are right. The original poster may still run into errors because input strings that aren't a valid Python expression are possible even with the restricted character set. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor