Member

[email protected]

Total likes received: 98 | Pubby Cash: 932


Articles Liked by Me: 87

You Think Sets Are Hard but They Actually Aren’t

Categories: General, Tech | Pubby Cash Received:  0

Similar to a list, a set is a collection that is unordered and unindexed. In Python, sets are written with curly brackets. The difference from lists is that you cannot access items in a set by referring to an index since sets are unordered the items has no index. However, you can loop through the set items using a for loop, or ask if a specified value is present in a set, by using the 'in' keyword. A Python set also resembles a dictionary because it cannot have duplicate values. This makes it easy when you want to store usernames from your website. When a user wants to create a new username, the program will first check if that username is in the set, and if not, then it will add the username to the set. One thing that surprised me was that sets were unordered. You might expect an item to be at that location when you add it but that’s not always the case. Since sets are unordered, so you cannot be sure in which order the items will appear. Unfortunately, you cannot change a value in a set, only add to it. To add one item to a set, use the ‘add()’ method. Use the ‘update()’ method to add more than one item to a set. Sets are easy to work with once you get the hang of it!...  Read more

This Data Structure Is Underrated!

Categories: General, Tech | Pubby Cash Received:  0

Let’s say that you needed to create a list of all the users that have been banned on your site. Many programmers would just use a list, and that’s just fine. They would insert a tuple containing information about the first user and the time banned, then continue with the second user and their time banned, and so on. If they want to remove a user from the list, they could either use ‘pop’ or ‘remove’. Additionally, if they want to update an item in a list, it can be very difficult because there might be multiple items with the same name. Basically, using a list isn’t the best way to go when it comes to storing lots of data that is easily accessible. So is there an even easier way? The answer is yes. Dictionaries are very beneficial in this situation because each item stored in a dictionary is unique. If you want to remove an item from a dictionary, all you have to do is find the key and delete it using the ‘del’ keyword followed by the name of the key. It’s that simple. And if you want to update an item in a dictionary, you can simply call that item using it’s key and set that to your new value. Many programmers underestimate the power of dictionaries and often turn to lists because dictionaries are just a little more confusing. But trust me, once you get the hang of dictionaries, storing data will feel like a breeze....  Read more

Lenovo Multimedia Remote with Keyboard N5901

Categories: Tech | Pubby Cash Received:  0

Do you like mini keyboards that can do everything on a computer? Well, the Lenovo Multimedia Remote with Keyboard N5901 is the right thing for you. This product is comfortable and efficient. This product is comfortable because it fits your hand very firmly. There is also a mini ball at the bottom of it. This ball acts as a trackpad or a mouse on a normal computer. When I was using this it felt very comfortable because the ball felt very smooth. Furthermore, the left and right-click above the ball is easy to use as well. Also, this product is efficient. After all, you can do anything you can do with a keyboard on it. There are even a sound button and a pause and play button at the very top of it. All in all, the Lenovo Multimedia Remote with Keyboard N5901 is very useful and is worth buying. ...  Read more

Is IDLE Good?

Categories: General, Tech | Pubby Cash Received:  10

It comes pre-installed with Python, but many coders just ignore it. Is IDLE worth your time? Well, if you’re a beginner, IDLE would be a great start for you. Although it has just the bare bones, the best place to experiment with Python code is in the interactive interpreter, otherwise known as a shell. The shell is a basic Read-Eval-Print Loop (REPL). It reads a Python statement, evaluates the result of that statement, and then prints the result on the screen. Then, it loops back to read the next statement. The Python shell is an excellent place to experiment with small code snippets. You can access it through the terminal or command line app on your machine, however, all of the text will be a single color and it will be hard to understand the outputs. You can simplify your workflow with Python IDLE, which will immediately start a Python shell when you open it. IDLE will automatically highlight the keywords and other python commands so you will know without a doubt what you are looking for. Every programmer needs to be able to edit and save text files. Python programs are files with the .py extension that contain lines of Python code. Python IDLE gives you the ability to create and edit these files with ease. Python IDLE also provides several useful features that you’ll see in professional IDEs, like basic syntax highlighting, code completion, and auto-indentation. Professional IDEs are more robust pieces of software and they have a steep learning curve. If you’re just beginning your Python programming journey, then Python IDLE is a great alternative!...  Read more

The Alexa

Categories: Tech | Pubby Cash Received:  0

Are you a person who forgets things a lot? Well, Alexa can help you. This tool is made by Amazon. It is helpful and safe. First, it is helpful because you can do so many things with it. For example, you don't have your phone with you, so you can tell Alexa to call whoever you want. Also, you can ask Alexa questions, such as what is the weather today, or what is the time. Furthermore, you can tell it to set reminders, like to wake up at seven in the morning. This just proves how helpful it is. Also, it is safe. After all, you can press the mic off button to disconnect the microphones. Not only that, but you can tell it to turn on the porch lights or set the thermostat 72. Overall, Alexa is a great product to buy. ...  Read more

1 ... 10 11 12 ... 18

Daily Deals


MECHANICSBURG WEATHER