View Active Threads
View Today's Posts
Home
Forums
View New Posts
View Today's Posts
My Discussions
Unanswered Posts
Unread Posts
Active Threads
Mark all forums read
Staff List
Member List
Help
Calendar
Search
Statistics
Interpreter
IRC
How to convert Text file contents into a dictionary.
Python Forum
Python Coding
General Coding Help
Thread Rating:
0 Vote(s) - 0 Average
1
2
3
4
5
Thread Modes
How to convert Text file contents into a dictionary.
wavic
So-and-so of the Yard
Posts:
2,955
Threads:
48
Joined:
Sep 2016
Reputation:
90
#7
Apr-28-2017, 07:00 AM
You can remove iter().
dict(zip(*line.split(':')))
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
Find
Reply
Messages In This Thread
How to convert Text file contents into a dictionary.
- by
tannishpage
- Apr-28-2017, 03:56 AM
RE: How to convert Text file contents into a dictionary.
- by
ndc85430
- Apr-28-2017, 05:39 AM
RE: How to convert Text file contents into a dictionary.
- by
tannishpage
- Apr-28-2017, 05:47 AM
RE: How to convert Text file contents into a dictionary.
- by
buran
- Apr-28-2017, 06:04 AM
RE: How to convert Text file contents into a dictionary.
- by
wavic
- Apr-28-2017, 06:09 AM
RE: How to convert Text file contents into a dictionary.
- by
tannishpage
- Apr-28-2017, 06:38 AM
RE: How to convert Text file contents into a dictionary.
- by
wavic
- Apr-28-2017, 07:00 AM
RE: How to convert Text file contents into a dictionary.
- by
zivoni
- Apr-28-2017, 07:48 AM
RE: How to convert Text file contents into a dictionary.
- by
wavic
- Apr-28-2017, 08:07 AM
RE: How to convert Text file contents into a dictionary.
- by
zivoni
- Apr-28-2017, 08:30 AM
RE: How to convert Text file contents into a dictionary.
- by
wavic
- Apr-28-2017, 08:35 AM
RE: How to convert Text file contents into a dictionary.
- by
zivoni
- Apr-28-2017, 08:49 AM
RE: How to convert Text file contents into a dictionary.
- by
nilamo
- May-11-2017, 03:49 PM
Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
Replace values in Yaml file with value in dictionary
PelleH
0
105
Jun-12-2024, 02:40 PM
Last Post
:
PelleH
Connecting to Remote Server to read contents of a file
ChaitanyaSharma
1
401
May-03-2024, 07:23 AM
Last Post
:
Pedroski55
[SOLVED] Correct way to convert file from cp-1252 to utf-8?
Winfried
8
1,524
Feb-29-2024, 12:30 AM
Last Post
:
Winfried
Convert File to Data URL
michaelnicol
3
1,396
Jul-08-2023, 11:35 AM
Last Post
:
DeaD_EyE
Python Script to convert Json to CSV file
chvsnarayana
8
2,774
Apr-26-2023, 10:31 PM
Last Post
:
DeaD_EyE
Need to compare the Excel file name with a directory text file.
veeran1991
1
1,236
Dec-15-2022, 04:32 PM
Last Post
:
Larz60+
Convert Excel file into csv with Pipe symbol..
mg24
4
1,457
Oct-18-2022, 02:59 PM
Last Post
:
Larz60+
Need Help: Convert .pcl file to .pdf file
ManuRaval
6
2,693
Sep-13-2022, 01:31 PM
Last Post
:
ManuRaval
Modify values in XML file by data from text file (without parsing)
Paqqno
2
1,856
Apr-13-2022, 06:02 AM
Last Post
:
Paqqno
convert a named tuple to a dictionary
Skaperen
13
3,830
Mar-31-2022, 07:13 PM
Last Post
:
Skaperen
Users browsing this thread: 1 Guest(s)
View a Printable Version
Forum Jump:
Private Messages
User Control Panel
Who's Online
Search
Forum Home
Python Coding
-- General Coding Help
-- Data Science
-- Homework
-- GUI
-- Game Development
-- Networking
-- Web Scraping & Web Development
General
-- News and Discussions
-- Tutorials
---- Tutorial Requests and Submissions
---- Python Installation and Execution
---- Fundamentals
---- Common pitfalls and what to do
---- Web Scraping
---- Web Tutorials
---- GUI tutorials
---- Game Tutorials
---- Networking Tutorials
-- Code sharing
-- Code Review
-- Jobs
Forum & Off Topic
-- Board
---- Weekly Top Picks
-- Bar
User Panel
Messages
Log Out
My Profile
Pay your profile a visit
User Control Panel
Do some changes on your profile
My Messages
View private messages
unread
Avatar
Change avatar
Signature
Change signature
Announcements
Announcement #1
8/1/2020
Announcement #2
8/2/2020
Announcement #3
8/6/2020
Login to Python Forum
Enter your details to login to your account:
Remember me
Lost Password?
Login
Don't have an account yet?
Sign Up!
Linear Mode
Threaded Mode