ยังแบบฟอร์เป็นพจนานุกรมของแฟ้มและคุณลักษณะภาษาไพธอน

รหัสตัวอย่าง

0
0

วิธีทำ dict จากแฟ้ม py

dictionary = {}
file = open("data.txt")
for line in file:
key, value = line. split() # Split line into a tuple.
dictionary[key] = value # Add tuple values to dictionary.
print(dictionary)

หน้าคล้ายกัน

คล้ายกันหน้ากับตัวอย่าง

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................