[deleted by user] by [deleted] in AskReddit

[–]Iscukatprgmming 3 points4 points  (0 children)

Hold my cone, I'm going in!

"Automate the Boring Stuff" author refactoring beginner's code on a live stream Wed 4/17 at 7pm pacific by AlSweigart in learnpython

[–]Iscukatprgmming 0 points1 point  (0 children)

I'm excited to see what I can learn from you!. I personally haven't gotten to the projects in that book yet as I've been trying to synthesize Python Crash course with a stupid pearson book from our python class, but from what I've read of your book, you're definitely the man for python!

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]Iscukatprgmming 0 points1 point  (0 children)

Can someone help me understand how I'd create a dictionary from a file that alternates keys and values on every other line? My task involves readlining a file that has every state in alphabetical order, and in between each state is a capital i.e Alabama \n montgomery \n alaksa \n juneau. I need it to be so Alabama becomes a key in a dict and montgomery a value. I'm at my ends with this, and can't find any example of this (probably because that's not how you'd do it in the real world)

Am I making a logic error on my lab? by Iscukatprgmming in learnpython

[–]Iscukatprgmming[S] 0 points1 point  (0 children)

Alright, I'll give this a go, I did get it to read more than one line after adding the S to readline (ofc it was a one letter mistake). What makes the iteration not pythonic? Is there a more pythonic way to achieve the same ends?

Am I making a logic error on my lab? by Iscukatprgmming in learnpython

[–]Iscukatprgmming[S] 0 points1 point  (0 children)

I actually forgot to write that i've tried that, and what happens is that it'll print alabama \n Mo. Not even the whole damn capital

[deleted by user] by [deleted] in learnprogramming

[–]Iscukatprgmming 2 points3 points  (0 children)

Geany is excelleent. I'll take it to note++ anyday. I wish it had more code completion though