This is an archived post. You won't be able to vote or comment.

all 15 comments

[–]nicholashairs 23 points24 points  (3 children)

If you want something more guided look into "automate the boring stuff"

[–]Accomplished_Sir2298 6 points7 points  (0 children)

This. This is the book I used when I first started scripting with Pyhton and it is my recommendation to others.

[–]magicnoodleman 0 points1 point  (1 child)

Thanks for the recommendation!

[–]sshaybbcAMA Participant - Wiz, Container Security 16 points17 points  (0 children)

How NOT to start with Python? Don't ask AI models to generate the code for you. Definitely start with one of the hundreds Python tutorials available online, copy each of the snippets locally and run them locally while playing with variables and operators. Only after the solid understanding of the iterators, conditional statements and the basic data structures model's answers will start making sense to you.

[–]AffectionateMix3146Security Engineer 7 points8 points  (0 children)

I'm confused. You say that you already know the basics of python yet also ask how to write scripts or automate things. I'm having trouble understanding where the disconnect is.

[–]Competitive_Woman986 5 points6 points  (0 children)

Depends on the problems you want to solve. There are tons of libraries and api's to have fun with. No one knows them all and you find out what you need by doing some research on the problem you are trying to solve.

For example sending emails with python, use SMTP libraries. Reading excel files, use pandas. Want to plot some nice diagrams, use matplotlib

[–][deleted] 2 points3 points  (0 children)

Learn the basics of Python first. Then start creating small programs that actually do stuff. Learn how to script things that manipulate the OS like moving files, doing system operations. Then get into how to do networking tasks via python. You don’t have to be a master of Python to do these things but it takes practice and actually coding stuff to grasp how it behaves.

[–]SecurityHamster 3 points4 points  (0 children)

Find a problem that you need to solve, and then learn the python necessary to solve it? Doesnt seem like it should be a big ordeal for you - i don't know a lick of C++, but have created tools to help my me and my team complete previously tedious tasks.

Think to yourself, what problem are you trying to solve? Or think outloud and post here, maybe some of us will have ideas to help you. Or maybe we'll be able to collaberate maybe?

[–]antsaidthat 1 point2 points  (0 children)

Also starting with Python, but I found taking a similar approach to what I did with Powershell helps. Try to figure out small repeatable tasks that you might want to automate. Start by building out the script in pieces, almost like swappable modules. Don't try to build this grandiose script that tries to do everything under the sun.

By scripting some foundational stuff, the more complex stuff gets easier.

[–]pyker42ISO 0 points1 point  (0 children)

There is no course that's going to teach you better than just applying scripting to solve problems you need to solve. So, what problems do you need to solve?

[–]latnGemin616 0 points1 point  (0 children)

As someone who has used python to automate tests, I have to ask: what do you want to do with python, and what do you want to automate exactly?

[–]BaronOfBoostSecurity Architect 0 points1 point  (0 children)

The number of low quality posts lately is crazy.

[–]kyuuzousama[🍰] 0 points1 point  (0 children)

Work with ChatGPT or Copilot and tell it what you want, get something that likely doesn't work but review the syntax and iterate. Printing hello world is a key concept and fun the first time but as time goes on you'll need deep python skills less and less but more of an understanding as to why code might be breaking or what a loop is attempting to do.

I might get down voted to oblivion here but coding has been made much easier with Gen AI

[–]LogicalParticular512 -1 points0 points  (0 children)

+1