Explaining the ‘find -mtime’ command

The POSIX specification for find says: -mtimen The primary shall evaluate as true if the file modification time subtracted from the initialization time, divided by 86400 (with any remainder discarded), is n. Interestingly, the description of find does not further specify ‘initialization time’. It is probably, though, the time when find is initialized (run). In the descriptions, wherever n is used as a primary argument, … Read more

TypeError: list indices must be integers, not str (boolean convertion actually)

Only change that needs to be made is that features must be initialized to a dict ({}) rather than a list ([]) and then you could populate it’s contents. The TypeError was because word_features is a list of strings which you were trying to index using a list and lists can’t have string indices. Here, the elements present in word_features constitute the keys of dictionary, features holding boolean values, True based on whether the same … Read more