Advanced Search
Search Results
812 total results found
Return statements
We previously learned how we can pass arguments into a function.We can do more than pass information into a function.We can also send information out of one!Return statements allow us to do this.A return statement is a Python statement that executes inside a f...
Functions and variables
Previously, you focused on working with multiple parameters and arguments in functions and returning information from functions. In this reading, you’ll review these concepts. You'll also be introduced to a new concept: global and local variables. Working wit...
Explore built-in functions
Now that we know how to create our own functions, let's also explore a few of Python's built-in functions.As we discussed previously, built-in functions are functions that exist within Python and can be called directly.Our only job is to call them by their nam...
Work with built-in functions
Previously, you explored built-in functions in Python, including print(), type(), max(), and sorted(). Built-in functions are functions that exist within Python and can be called directly. In this reading, you’ll explore these further and also learn about the ...
Activity: Define and call a function
Introduction As a security analyst, when you're writing out Python code to automate a certain task, you'll often find yourself needing to reuse the same block of code more than once. This is why functions are important. You can call that function whenever...
Modules and libraries
Hello again!Previously, we learned about built-in functions in Python.Built-in functions come standard with every version of Python and consist of functions such as print(), type(), max(), and many more.To access additional pre-built functions, you can import ...
Import modules and libraries in Python
Previously, you explored libraries and modules. You learned that a module is a Python file that contains additional functions, variables, classes, and any kind of runnable code. You also learned that a library is a collection of modules that provide code users...
Code readability
Welcome back!One of the advantages to programming in Python is that it's a very readable language.It also helps that the Python community shares a set of guidelines that promote clean and neat code.These are called style guides.A style guide is a manual that i...
Ensure proper syntax and readability in Python
Previously, you were introduced to the PEP 8 style guide and its stylistic guidelines for programmers working in Python. You also learned about how adding comments and using correct indentation makes your code more readable. Additionally, correct indentation e...
Dorsa: Use Python efficiently on a cybersecurity team
Hi, my name is Dorsa and I'm a security engineer.What I love the most about my job is that I get to look at different infrastructures and system designs on a daily basis.One piece of advice for individuals who are starting out in their cybersecurity profession...
Wrap-up; Reference guide: Python concepts from module 2
Great work on making it this far in the Python course!You've put in a lot of work and effort towards learning more about how you can use Python effectively and efficiently.Let's quickly recap the concepts you learned throughout the videos.First, we started by ...
Glossary terms from module 2
Terms and definitions from Course 7, Module 2 Argument (Python): The data brought into a function when it is called Built-in function: A function that exists within Python and can be called directly Comment: A note programmers make about the intention behin...
Welcome to module 3
As a security analyst,you'll work with a lot of data.Being able to develop solutions formanaging this data is very important.What we're about to learn inPython will help you with that.Previously, we setfoundations for what we're going to do in this section.We ...
String operations
Knowing how to work with the string data in security is important. For example, you might find yourself working with usernames to find patterns in login information. We're going to revisit the string data type and learn how to work with it in...
String indices and slices
In security, there are a variety of reasons we might need to search through a string. For example, we might need to locate a username in a security log. Or, if we learn that a certain IP address is associated with malware, we might search for...
Strings and the security analyst
The ability to work with strings is important in the cybersecurity profession. Previously, you were introduced to several ways to work with strings, including functions and methods. You also learned how to extract elements in strings using bracket notation and...
List operations in Python
Another data type we discussed previously is the list.Lists are useful because they allow you to store multiple pieces of data in a single variable.In the security profession, you will work with a variety of lists.For example, you may have a list of IP address...
Write a simple algorithm
In our everyday lives, we frequently follow rules for solving problems.As a simple example, imagine you want a cup of coffee.If you've made coffee many times, then you likely follow a process to make it.First, you grab your favorite mug.Then, you put water int...
Lists and the security analyst
Previously, you examined how to use bracket notation to access and change elements in a list and some fundamental methods for working with lists. This reading will review these concepts with new examples, introduce the .index() method as it applies to lists, a...
Regular expressions in Python
We've already learned a lot about working with strings.This includes working with their positional indices and slicing them.In the previous video, we applied these to extract the first three digits from a list of IP addresses.In this video, we're going to focu...