-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Todd Matsumoto <c.t.matsum...@gmail.com> schrieb: >> #1. Error handling for the files to ensure reading only .txt file >Look up exceptions. >Find out what the string method endswith() does.
One should note that the OP probably meant files of the type text/plain rather than .txt files. File name extensions are a convenience to identify a file on first glance, but they tell absolutely nothing about the contents. So, look up MIME types as well ;)! - -nik -----BEGIN PGP SIGNATURE----- Version: APG v1.0.8-fdroid iQFNBAEBCgA3BQJSX/F3MBxEb21pbmlrIEdlb3JnZSAobW9iaWxlIGtleSkgPG5p a0BuYXR1cmFsbmV0LmRlPgAKCRAvLbGk0zMOJZxHB/9TGh6F1vRzgZmSMHt48arc jruTRfvOK9TZ5MWm6L2ZpxqKr3zBP7KSf1ZWSeXIovat9LetETkEwZ9bzHBuN8Ve m8YsOVX3zR6VWqGkRYYer3MbWo9DCONlJUKGMs/qjB180yxxhQ12Iw9WAHqam1Ti n0CCWsf4l5B3WBe+t2aTOlQNmo//6RuBK1LfCrnYX0XV2Catv1075am0KaTvbxfB rfHHnR4tdIYmZ8P/SkO3t+9JzJU9e+H2W90++K9EkMTBJxUhsa4AuZIEr8WqEfSe EheQMUp23tlMgKRp6UHiRJBljEsQJ0XFuYa+zj6hXCXoru/9ReHTRWcvJEpfXxEC =hJ0m -----END PGP SIGNATURE----- _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor