By default, the preview capability exists for most text-based files in File Explorer. However, for some file types, such as .log or .py, a preview may not be generated by default and you see the message “No preview available” in the preview pane in File Explorer.
You can enable preview of such files (.log and .py) in the preview pane using a registry edit.Read more