Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Python
make dictionary from text file python
Meraj hussain
Programming language:
Python
2021-07-04 23:27:24
0
Q:
make dictionary from text file python
npst
Code:
Python
2021-07-08 19:57:25
d = {} with open("file.txt") as f: for line in f: (key, val) = line.split() d[int(key)] = val
-2
Tags
python
file
text
make
dict
text file
Related
python read dictionary from file
convert dict to string python
python save a dictionary as an object
how to print a value from a dictionary in python
python create dictionary from key value
write dict to json python
python reading into a text file and diplaying items in a user friendly manner
python convert b string to dict
change string to dict python
python save list items to dictionary
python dict keys to string
printing dictionary in python
printing python dictionary values
convert str to dict python
how to open a text file in python
how to create dictionary in python from csv
open text file in python
change dictionary value python
New to Communities?
Join the community