sc2player 0 Newbie Poster

Hi I was wondering how to extract info from a data file, and place it in a dictionary. Say you're given a file, in the following format:

tomCruise # Username
Tom Cruise # Name
Los Angeles, CA # Location
http://www.tomcruise.com # URL
Official TomCruise.com crew tweets. We love you guys! # Bio (line 1)
Visit us at Facebook! #Bio (line 2)
ENDBIO
katieH # Followers
NicoleKidman # Followers
END # End

There are multiple users in the data file, but all of them have the same format. I initially started by creating an empty dictionary, and then wanted to use the usernames as keys, and place the rest of the information as a separate dictionary inside the username key.

But I'm having trouble translating this into actual code. How would I start off?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.