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



Get 80% off the full course from this link:

Support me on Patreon:

Buy the print book here:

Lesson 14 of the online Python programming course for complete beginners. This course follows the…

, , , , , ,

16 thoughts on “Lesson 14 – Python Programming (Automate the Boring Stuff with Python)

  1. 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

  2. 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.

  3. 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:)

Leave a Reply

Your email address will not be published. Required fields are marked *