ENع
الدرس 13 · Real programs

Working with files

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

Variables vanish when a program ends; files stay on disk. Step through a six-line program, files.py, that writes a two-item shopping list to shop.txt and reads it back. Watch open() hand you a file object, see the writes wait in a buffer until with closes the file, read the file one line at a time, and meet the error you get when a file is missing.

12 دقيقة10 خطوات5 أسئلةIntermediate
شكل 13 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.