-
Automate the Boring Stuff with Python
Home | Buy Direct from Publisher | Buy on Amazon | @AlSweigart | Support on Patreon | Write a Review |
By Al Sweigart. Over 500,000 copies sold. Free to read under a CC license.
"The best part of pro...
-
Automate the Boring Stuff with Python
In Python, 2 + 2 is called an
expression, which is the most basic kind of programming instruction in the language. Expressions consist of
values (such as 2) and
operators (such as +), and they can ...
-
Automate the Boring Stuff with Python
['4/6/2015 12:46', 'Pears', '14'], ['4/8/2015 8:59', 'Oranges', '52'],
['4/10/2015 2:07', 'Apples', '152'], ['4/10/2015 18:10', 'Bananas', '23'],
['4/10/2015 2:40', 'Strawberries', '98']]...
-
Automate the Boring Stuff with Python
THE DIFFERENCE BETWEEN THE == AND = OPERATORS
You might have noticed that the == operator (equal to) has two equal signs, while the = operator (assignment) has just one equal sign. It’s easy to confus...
-
Automate the Boring Stuff with Python
webbrowser module to open those links in browser tabs.
Make your code look like the following:
#! python3
# lucky.py - Opens several Google search results.
import requests, sys, webbrowser, bs4
...
-
Automate the Boring Stuff with Python
+), and they can always
evaluate (that is, reduce) down to a single value. That means you can use expressions anywhere in Python code that you could also use a value.
In the previous example,
2 + 2 ...