Lesson 14 - Python Programming (Automate the Boring Stuff with Python)

preview_player
Показать описание


Рекомендации по теме
Комментарии
Автор

sentence = ['Nice', 'video!']
for i in range(len(sentence)):
print(sentence[i])

mariafe
Автор

Instead of using range + len, use enumerate if you need both the index and the item in the list

for i, item in enumerate(supplies):
print('Index ' + str(i) + ' in supplies is: ' + item)

Kralnor
Автор

The multiple assignment part of this video alone, saved 45 min at work lol...

itspo
Автор

loving your book! you're a good teacher!

ug
Автор

It's an Important part of tutorial with all those shortcuts!!

tarunbirsingh
Автор

"Flame-throwers typical office stuff". Sounds like Dwight Schrute's office.🤣🤣

nishanth
Автор

while supplies[2] == 'flame-throwers':
print('LOL!')

electromagnetic_chief_johnny
Автор

Flamethrowers ahahhahah I wish i had that in my office sometimes :)

ultramaxx
Автор

Hello Al,

Can you tell me how you edited the IDLE Editor so when you make a bracket it automatically creates two?

swisscurrent
Автор

How is this python automation. I have not seen nor heard a single thing about pyautogui thus far. I dont get it, this is all python beginner stuff that you can find anywhere else. Where is the automation part?

enesipek
Автор

Hi Al, really great tutorial you got here! Thanks for sharing, man!

Just wanted to check on an error code I got when I tried to run the line of code on 4:33.
I've created a list of supplies containing the following:
['pens', 'pencils', 'drawing-boards', 'binders', 'printing-paper']

However, running the following line returns the error down below.
for i in range(len(supplies)):
print("Index " + str(i) + " in supplies is: " + supplies(i))

Traceback (most recent call last):
File "<pyshell#44>", line 2, in <module>
print("Index " + str(i) + " in supplies is: " + supplies(i))
TypeError: 'list' object is not callable

Why's this? Please advise.

englishsurvivalguide
Автор

im wondering if theres a way to make the list increase by an equation off the sum of the last iteration of the list. such as instead of increasing by 2 it increases by 133% of the last number

jakeambrose
Автор

I am getting an error with this no matter how careful i am with copying lesson from YouTube. SyntaxError: multiple statements found while compiling a single statement

soothingmusic
Автор

14 videos in and i still didn't see any automation stuff :'D

tamboleo
Автор

Can't forget about your everyday Flame-thrower office supply

MusicNerdMIDI
Автор

wait. How did someone make a coding software. If they used coding to make it, then new question, how was the first coding software made?

Sam-bbdd
Автор

programmed in C and it has weird syntax

liluna
Автор

I had a list with 100 items and then I multiplied it by 9, 000. It crashed the IDLE 😆

coopermccormick
Автор

Hi Al, was wondering if you could help with something concerning lists? What I was wanting to know is if it is possible to take was resides in variable "y" (shown below) and place it in a text file. Struggling with how to ask this so will use word instead of syntaxical code.

for example I can take and dump all that is in the current working directory and dump it into a variable. 
y=os.listdir(os.curdir)
Then can dump to screen contents of "Y" carrying out;
 print(y)

The data is dumped to the screen in this format.
[' bacon.txt', ' created.txt', ' myCats.py', ' mydata.bak', ' mydata.dat', ' mydata.dir', '264_Files_And_Path.txt', '2nd_draft_FindFile_and_path_and_write_2_file.py', 'aac_Files_And_Path.txt', 'aces.exe_Files_And_Path.txt', 'alarm.wav'] 

What I would like to see happen is the data shown above be dumped into a text file with all the brackets, commas and apostrophes included. Is this possible. So far I can only dump the data as seen into a variable then to the screen.

Thank you continuing to read your book and each pass glean something new:)

MaxGoddur
Автор

Udemy really sucks. I tried to sign up and everytime I go to checkout, it asks me to sign up again. Al.. you have great learning but you need to get another organization to sell your stuff

johnborghese
visit shbcf.ru