Python documentation - File and Directory Access
读取文件
1 | f = open('filename.txt', 'r') |
迭代目录
1 | import os |
迭代文件行
1 | for line in open('filename.txt', mode="r", encoding="utf-8"): |
写入文件
1 | # 覆盖模式 |
Python documentation - File and Directory Access
1 | f = open('filename.txt', 'r') |
1 | import os |
1 | for line in open('filename.txt', mode="r", encoding="utf-8"): |
1 | # 覆盖模式 |
Raster Image
Vector Graphic
3D Image
Definition of Bitmap and Raster Image
3D Image Files
Graphics Interchange Format
File signature 47 49 46 38
Joint Photographic Experts Group
File signature FF D8 FF E1
Portable Network Graphics
File signature 89 50 4E 47
第一张SVG图片
1 | data:image/svg+xml,%3Csvg width='300' height='300' xmlns='http://www.w3.org/2000/svg'%3E%3Ctext x='50%25' y='50%25' font-size='30' fill-opacity='0.08' text-anchor='middle' dominant-baseline='middle' transform='rotate(-45, 150 150)'%3E%E7%AC%AC%E4%B8%80%E5%BC%A0SVG%E5%9B%BE%E7%89%87%3C/text%3E%3C/svg%3E |
File signature 52 49 46 46 xx xx xx xx 57 45 42 50
| 地 区 | 人口数(万) | 2020年比重 | 2010年比重 |
|---|---|---|---|
| 广 东 | 12601 | 8.93 | 7.79 |
| 山 东 | 10152 | 7.19 | 7.15 |
| 河 南 | 9936 | 7.04 | 7.02 |
| 江 苏 | 8474 | 6 | 5.87 |
| 四 川 | 8367 | 5.93 | 6 |
| 河 北 | 7461 | 5.28 | 5.36 |
| 湖 南 | 6644 | 4.71 | 4.9 |
| 浙 江 | 6456 | 4.57 | 4.06 |
| 安 徽 | 6102 | 4.32 | 4.44 |
| 湖 北 | 5775 | 4.09 | 4.27 |
| 广 西 | 5012 | 3.55 | 3.44 |
| 云 南 | 4720 | 3.34 | 3.43 |
| 江 西 | 4518 | 3.2 | 3.33 |
| 辽 宁 | 4259 | 3.02 | 3.27 |
| 福 建 | 4154 | 2.94 | 2.75 |
| 陕 西 | 3952 | 2.8 | 2.79 |
| 贵 州 | 3856 | 2.73 | 2.59 |
| 山 西 | 3491 | 2.47 | 2.67 |
| 重 庆 | 3205 | 2.27 | 2.15 |
| 黑龙江 | 3185 | 2.26 | 2.86 |
| 新 疆 | 2585 | 1.83 | 1.63 |
| 甘 肃 | 2501 | 1.77 | 1.91 |
| 上 海 | 2487 | 1.76 | 1.72 |
| 吉 林 | 2407 | 1.71 | 2.05 |
| 内蒙古 | 2404 | 1.7 | 1.84 |
| 北 京 | 2189 | 1.55 | 1.46 |
| 天 津 | 1386 | 0.98 | 0.97 |
| 海 南 | 1008 | 0.71 | 0.65 |
| 宁 夏 | 720 | 0.51 | 0.47 |
| 青 海 | 592 | 0.42 | 0.42 |
| 西 藏 | 364 | 0.26 | 0.22 |
中英联合声明签署日:1984年12月19日
同时期其他元素:特异功能张宝胜