Learning Sets + (I/O) in Python

Jesse Sumrak
Becoming a Developer
2 min readDec 14, 2018

I started off the week by reviewing what I’d learned about dictionaries. After a couple days of that, I was feeling more comfortable with it, and I even got my program to work within the bear game I’m creating. Created a very simple map/maze where players had to navigate through different locations in order to escape. When the players typed in a location, this was the key for the dictionary, which fired up the description of the entered location as well as the available exits from that location. Took me a while to understand and get it to work, but I eventually figured it out! Woohoo!

Moved on from dictionaries to sets, and I really enjoyed the sets. Seems like there’s a lot of functionality to them, as far as unions, differences, and what not go, but I killed the challenges presented, so that boosted my confidence (for once!). It’s the small wins 😃!

After sets, starting getting into inputs and outputs in Python, and this is the most exciting part for me thus far. I’m most excited because it’s the first time I’m doing something within the Python program that’s impacting files/conditions outside of the program. So, I was able to create a variable and then write that variable to a .txt file, and then read that file back into the program. Pretty sweet! Can’t wait to explore it further and see what I can do with this.

--

--

Jesse Sumrak
Becoming a Developer

Jesse Sumrak is a writing zealot focused on creating killer content. He’s spent almost a decade writing about startup, marketing, and entrepreneurship topics.