Corey Schafer
Corey Schafer
  • 210
  • 25 432 732



  • YuJin Dev
    YuJin Dev Minute ago


  • Mallory Milstead

    So, the conda_auto_env functions works on by Ubuntu machine, however, if I am simply using the terminal outside of any virtual environments, i get this line after EVERY COMMAND :( "conda_auto_env: command not found" Anyone know why?

  • Daegu Dude
    Daegu Dude Hour ago

    Nobody got me understood git this well better than Corey..

  • totaltwit
    totaltwit Hour ago

    Perfect, I took everything in.

  • Gerald Bustos
    Gerald Bustos Hour ago

    Gracias desde Chile!

  • YuJin Dev
    YuJin Dev 2 hours ago

    14:53 Tread pool executor : easier way of doing threading

  • Ramarao Amara
    Ramarao Amara 4 hours ago

    Thanks bro, your teaching is really awesome ..

  • Victor Olet
    Victor Olet 4 hours ago

    Noticed in python 3.7.4, you can still print both keys and value into one variable: student={"Name":"John","Age":25,"Course":["Math","CompSci"]} for keys in student.items(): print(keys) __________________________ ('Name', 'John') ('Age', 25) ('Course', ['Math', 'CompSci']) Thank you for these tutorials!

  • Jash Jasani
    Jash Jasani 4 hours ago

    Job well done. I really wished to find how do you change your jupyter startup folder. If possible can you lmk please.

  • Ahmad Mirzaei
    Ahmad Mirzaei 5 hours ago

    You are Amazing ....

  • Kevin T
    Kevin T 5 hours ago

    How did you clear the screen inside the Python Repl?

  • Henrique Pigozzo
    Henrique Pigozzo 6 hours ago

    The timeout param is amazing. Thanks!

  • Yomen Tohmaz
    Yomen Tohmaz 8 hours ago

    Thank you for all the help you provide. You make the material very easy to understand, and if I ever get a job in this field, it'll be all thanks to you!

  • Aayush Neupane
    Aayush Neupane 8 hours ago

    somebody help me understand meta class i didnt really get it

  • Crypto Rootz
    Crypto Rootz 11 hours ago

    how would i set this up for protonmail ?

  • Neon Ron
    Neon Ron 12 hours ago

    It dosent work for me please help

  • Alan Tureen
    Alan Tureen 12 hours ago

    Many thanks Corey, It is by far the best python tutorial I have ever seen. Informative, comprehensive and just perfect.

  • carlton daniel
    carlton daniel 13 hours ago

    Thank you sir, it helped me understand sending email in a simple way

  • save mankind
    save mankind 15 hours ago

    <__main__.Employee instance at 0x7ff49d9d2248> how can i fix this error please i do not get any output

  • hamza khiate
    hamza khiate 16 hours ago

    Thank you Corey , You are the best !!!!!!!

  • Siva Sukumar Reddy
    Siva Sukumar Reddy 17 hours ago

    Please make a video on asyncio too.

  • veeranna bandaru
    veeranna bandaru 17 hours ago

    @Corey Schafer, I have seen many videos and read many articles on generators and iterators but this video gave me better understanding. Thanks for the video.

  • Gizmapps.
    Gizmapps. 19 hours ago

    For bootstrap alerts full functionality some tags must be added to the MESSAGE_TAGS = {message_constants.DEBUG: 'debug', message_constants.INFO: 'info', message_constants.SUCCESS: 'success', message_constants.WARNING: 'warning', message_constants.ERROR: 'danger',} And then in the base.html {% if messages %} {% for message in messages %} <div class="alert alert-{{ message.tags }} alert-dismissible text-center" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button> <strong>{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}Error{% else %}{{ message.tags|title }}{% endif %}!</strong> {{ message }} </div> {% endfor %} {% endif %} Source :

  • Eugene Davies
    Eugene Davies 20 hours ago

    HI Corey, great tutorial, thank you. I do encounter a bug and need your help please. When I do a post the time is not accurate. In the post I display the date created as well as the time created. The time difference is anything from 50min ahead in time or a few minutes before the actual post submission. I have changed the timezone setting to the local timezone. What could the issue be? I have no idea at this stage how to correct that.

  • Sorin Oltean
    Sorin Oltean 21 hour ago

    Finally i see your face :). Was always wondering how the best Python teacher on YT looks like, now i know.

  • WutWut InTheBut
    WutWut InTheBut 21 hour ago

    Just remember that Python is ALWAYS SINGLE-THREADED and that its "threads" are fake. They have something called the GIL (Global Interpreter Lock) which means that only 1 thread executes at a time. Two threads cannot execute instructions at the SAME time. They give the illusion of multithreading by implementing "let other threads do work while this function waits for data". It required that the functions are written to be asynchronous, such as time.sleep() or various file I/O functions. But if you try non-asynchronous calls (things that internally block while waiting for the result) such as "a = b * c" or "a = numpy.zeros([10,10])", meaning most math operations and C libraries, then the whole "thread illusion" in Python falls apart. Each thread will then pause the whole program until each such operation is complete. Which means the "threaded" version will take longer to execute than single threaded. The alternative which gives true multi-CPU execution is the "multiprocessing" module which spawns a separate Python process, but it is very slow to start and it transfers data in a slow way (serialized with pickle) between the main process and subprocess. Python are working on a "subinterpreter" module which starts the extra process inside the main process which will be a bit faster but stil requires pickling the data. In short the situation is bad. And Python will not remove the GIL to fix their threads because it would break all C modules and code that assumed that Python is always single-threaded... sigh.

  • Mattia Papa
    Mattia Papa 22 hours ago

    Man thank you so much, this video was enlightening!

  • edgar lip
    edgar lip 23 hours ago

    this was awesome ! waiting for the more advances topics that you suggested !!!

  • swarup ghadei
    swarup ghadei 23 hours ago

    Is there a way for multiple users to edit a code in the same jupyter notebook ?

  • Ahmad Hussian
    Ahmad Hussian Day ago

    Before I start this video, do I have to pay anything to deploy the website?

  • Kannan S M
    Kannan S M Day ago

    Actually the one thingwhich I really wanted to do on windows is using linux commands but not able to find the steps to do it 😊 finally this video made my day

  • Dipesh Pal
    Dipesh Pal Day ago

    debug = false, cause 500 error on Heroku. Help please, many people are facing the same problem on the internet, you can check StackOverflow. Please reply

  • Michael Imy
    Michael Imy Day ago

    IDK how but I have been using python for about 2(ish?) years now and most of these are brand new to me and HOLY CRAP DO THEY CHANGE SO MUCH

  • A U
    A U Day ago

    Be careful 13:10 snapshots do take up alot of Memory on your Drive.

  • YK Ho
    YK Ho Day ago

    Thank you so much, your teaching is clear and easy to understand! It helps me a lot.

  • Hongbing Qin
    Hongbing Qin Day ago

    It's great video. However, I receive the following error when run your code to print results in my windows. But the code works when I run it in aws environment. BrokenProcessPool Traceback (most recent call last) <ipython-input-2-0afe91731d1f> in <module> 3 results =, secs) 4 ----> 5 for result in results: 6 print(result) 7 ~\AppData\Local\Continuum\anaconda3\lib\concurrent\futures\ in _chain_from_iterable_of_lists(iterable) 474 careful not to keep references to yielded objects. 475 """ --> 476 for element in iterable: 477 element.reverse() 478 while element: ~\AppData\Local\Continuum\anaconda3\lib\concurrent\futures\ in result_iterator() 584 # Careful not to keep a reference to the popped future 585 if timeout is None: --> 586 yield fs.pop().result() 587 else: 588 yield fs.pop().result(end_time - time.monotonic()) ~\AppData\Local\Continuum\anaconda3\lib\concurrent\futures\ in result(self, timeout) 430 raise CancelledError() 431 elif self._state == FINISHED: --> 432 return self.__get_result() 433 else: 434 raise TimeoutError() ~\AppData\Local\Continuum\anaconda3\lib\concurrent\futures\ in __get_result(self) 382 def __get_result(self): 383 if self._exception: --> 384 raise self._exception 385 else: 386 return self._result BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.


    I'm not kidding : that's one of the best tutorials I have ever seen in so many fields (Also I'm an R user)

  • jedsonguedes
    jedsonguedes Day ago

    Do one with your favorite library for parsing XML, please.

  • jedsonguedes
    jedsonguedes Day ago

    Another great video

  • jedsonguedes
    jedsonguedes Day ago

    I gotta say: it's so rare to find someone with such a great ability for teaching. You should do another one for XML parsing.

  • Veronica Venture

    Hi Corey, I wanted to know if it is possible to label every tick. For example can you put labels for ages 30, 50, 70, 90?

  • ChrisHalden007

    Fantastic, covers all what I needed to understand !!!!

  • edgar lip
    edgar lip Day ago

    awesome !!! waiting for the more advanced also !!!!

  • Alex the greatest

    Your tutorial is really easy to follow and I learned a lot from you. Thank you.

  • Clarence Anu Channel

    A newer versus for this sublime text is needed for python.

  • shivajee rai
    shivajee rai Day ago

    Is item and items function is same?

  • Maciej Myśliński

    It is the first video where I've to reduce video speed to 0.95 xD Anyway great stuff Corey! Just started watching, but I think Django will be one of my favorite frameworks!

  • Farzin F
    Farzin F Day ago

    jinja2.exceptions.TemplateNotFound: home.html

  • Sonny Kim
    Sonny Kim Day ago

    "run-script" package does not work with input() (and probably more features than that...). I recommend to use "atom-python-run" package and Press F5 to run the python code.

  • asdf ;lkj
    asdf ;lkj Day ago

    how do I update .csv file

  • Wwtorm
    Wwtorm Day ago

    How to change email?

  • Hemanth Kotagiri

    So is this the end for Python's OOPs? Is there anything more that I need to learn about Python's Classes?

    • Hemanth Kotagiri
      Hemanth Kotagiri 21 hour ago

      @ItzGanked Thank you so much. Although, my point is not to become an expert at python but to know how far and how well I can get at it. :)

    • ItzGanked
      ItzGanked Day ago

  • Ruchir Sinha
    Ruchir Sinha Day ago

    Thanks Corey!! These tutorials are simply great.

  • stusoduncan
    stusoduncan Day ago

    Excellent. Concise as always, much appreciated.

  • Crusader No Regret

    import urllib.parse import json import requests from urllib.request import urlopen with urlopen(',-4.39,-52.17,-37.68&faa=1&satellite=1&mlat=1&flarm=1&adsb=1&gnd=1&air=1&vehicles=1&estimated=1&maxage=14400&gliders=1&stats=1') as response: source = json_data = json.loads(source) print(json.dumps(json_data, indent=2)) #I ran this code and had the error below: /home/user/PycharmProjects/projetos/venv/bin/python /home/user/PycharmProjects/projetos/venv/ Traceback (most recent call last): File "/home/user/PycharmProjects/projetos/venv/", line 9, in <module> with urlopen(',-4.39,-52.17,-37.68&faa=1&satellite=1&mlat=1&flarm=1&adsb=1&gnd=1&air=1&vehicles=1&estimated=1&maxage=14400&gliders=1&stats=1') as response: File "/usr/lib/python3.6/urllib/", line 223, in urlopen return, data, timeout) File "/usr/lib/python3.6/urllib/", line 532, in open response = meth(req, response) File "/usr/lib/python3.6/urllib/", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.6/urllib/", line 570, in error return self._call_chain(*args) File "/usr/lib/python3.6/urllib/", line 504, in _call_chain result = func(*args) File "/usr/lib/python3.6/urllib/", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden Process finished with exit code 1 #CAN YOU HELP ME?

  • llamasarus1
    llamasarus1 Day ago

    How do you put a delete message in the DeleteView?

  • Raghul Palani
    Raghul Palani Day ago

    Hi Corey, How to copy a Excel(.xlsx, .xls) data to the body of the email?

  • Ian Sharp
    Ian Sharp Day ago

    You are a gifted teacher. thankyou.

  • Kirby Sebastian

    Is there any other useful usecases for this? Thanks for this btw. \m/

  • Sachin Sharma
    Sachin Sharma Day ago

    perfect tutorial for a beginner <3.... Thanx for this awesome tutorial corey.

  • Nd_I_Oop
    Nd_I_Oop Day ago

    Love your vids dude <3

  • champion
    champion Day ago

    When does a person usually use a web scraper? I mean in terms of practical sense. Why do I need to scrape someone else's or my own site for information?

    • Porco Rosso
      Porco Rosso 8 hours ago

      May be when you want to backup someone's site/information for your own records. Or reformat and a aggregate news/posts to build your own dashboard or news site. Or programically classify a website. Or investigate all links to that website.

  • Tian Hao
    Tian Hao Day ago

    learn a lot from ur video,make more plz

  • For Synth's Sake

    What pattern will do a literal search but only on the first two words of a string?

  • Chandraveer Singh

    Thank you

  • Billionaires motivation

    somebody please help me :)

  • Felt
    Felt Day ago

    What python editor do you use?

    • Corey Schafer
      Corey Schafer 10 hours ago

      Hey There. I use Sublime Text for my tutorials since it's pretty minimalist. I also use VSCode for my day-to-day coding. I made a video on how I set up my Python development environment in both of those editors. You can find those videos here: Sublime Text - VSCode - Thanks!

  • Basheer Basheer

    Great tutorial I really love your explanation, I hope to speak little bit slowly next time :)

  • Pegcailla
    Pegcailla Day ago

    too good yo

  • Kaiwalya Powle

    Hi, I moved the .bashrc and .bash_profile files in a temp directory but now I am not able to move them back to their original location. This is funny but can you guide me to move them back please ?

  • Odaa Show
    Odaa Show Day ago

    Hello hi

  • Gurmeet Singh
    Gurmeet Singh Day ago

    Hi I am new to Python, should I be using Sublime text, Pycharm IDE (pro or free edition), Anaconda (Jupyter notebook) What is pros and cons of each?

  • Dimitar Dimitrov

    Great work. Not many channels like yours in youtube. Amazing content, very valuable

  • Vishal Agarwal

    When the advance re video coming?

  • Himanshu Shekhar

    Please add Admin Panel to manage all users and posts

  • chris ribia
    chris ribia Day ago

    worked for me ,,, Greate tutorial

  • Basheer Basheer

    someway the project_env is not recognized :(

  • akash pawar
    akash pawar Day ago

    Love from india

  • edgar lip
    edgar lip 2 days ago

    Hi , as usual best video by far on the topic , i also wanted to mention ( may be it was mentioned before ) that @Decorator_Class // ----> is the same as display = Decorator_Class(display) def display(): print('display function ran \n') *this is regarding the oop part.

  • Aakash tiwari
    Aakash tiwari 2 days ago

    sir plz help flashed message is not running what should i do?

  • Matthew Mo
    Matthew Mo 2 days ago

    Corey, do you have a tutorial on setting up for an API based on this Blog Project? Such as allowing authorization token access application? Thank you.

  • poornima parlapelli

    Is there anyway we can read the recaptcha using requests module’ thank your

  • Jack Frosterton
    Jack Frosterton 2 days ago

    All you have to do to Snap Windows on mac is press the green button once so the window is smaller than full screen, then click and hold the green button for 2 seconds.

  • Natural Resources
    Natural Resources 2 days ago


  • Bishwas Bhandari
    Bishwas Bhandari 2 days ago

    If you enduring through an error of *BeautifulSoup User Warning*, just have a check here:

  • Rahul R
    Rahul R 2 days ago

    Error while installing mem_profile using pip. Could not find a version that satisfies the requirement mem_profile (from versions: ) No matching distribution found for mem_profile

  • Chitti Polinaidu
    Chitti Polinaidu 2 days ago

    excellent dear

  • sebastian hernandez

    the f string seems really useful. Im running python 3.7.4 but its not allowing me to use it! :(

    • sebastian hernandez
      sebastian hernandez 10 hours ago

      Corey Schafer Thank you so much, I’ll be sure to check it out!

    • Corey Schafer
      Corey Schafer 10 hours ago

      Hey there. That looks like it might be an issue with your PATH. I have two videos on that topic (One for Mac/Linux, one for Windows). If you watch the one for your operating system then it should give you a good idea of how to fix your problem. You can find those here... Mac/Linux: Windows:

  • Ashley
    Ashley 2 days ago

    How come when I create a new virtualenv I get this response `New python executable in /Users/ashley/projects/virtual_environments/pelican/bin/python2.7` I do have 3.7.4 installed, confirmed by running `python -V`. But now inside the virtualenv I get 2.7.15 I had to run `virtualenv -p python3 pelican` to get the appropriate version in the vm

  • Pedro Lopez
    Pedro Lopez 2 days ago

    Nice and simple. Thanks!

  • Bohdan Kokovych
    Bohdan Kokovych 2 days ago

    Enjoy! 1) 0:34 - ternary operator ; 2) 2:13 - Underscores in Numeric Literals + about f-string; 3) 4:29 - context manager ; 4) 6:49 - enumerate function ; 5) 9:01 - zip function ; 6) 13:46 - unpacking tuples (use asterisk and underscore); 7) 19:11 - getting and setting attributes to object (setattr, getattr ); 8) 26:24 - getpass instead input (read from keyboard) ; 9) 29:22 - run python with dash m in terminal (python -m ...); 10) 32:32 - built-in functions (help, dir etc)

  • thatTUESDAYchannel
    thatTUESDAYchannel 2 days ago

    Dude for some reason it jus dosent work for me.... I have the file in the same directory and it always gives me a filenotfounderror

    • Corey Schafer
      Corey Schafer 2 days ago

      It may be your editor and where it is running Python from. Sublime defaults to the directory of the file I'm currently running. It might be good practice to just use the entire file PATH to the file

  • SirMoefe
    SirMoefe 2 days ago

    If anyone else is looking for the Linux Shortcut to auto format the code, it is: ctrl - shift + i

  • Nicolas Codispoti
    Nicolas Codispoti 2 days ago

    Is it possible to pick a random number between two different lists? Like using the list positions as the parameters and then having a script pick a random integer between the two list item values. (The list items in question are a list of numbers)

  • Jerett Franklin
    Jerett Franklin 2 days ago

    You are a timesaver, thanks!

  • Pedro Lopez
    Pedro Lopez 2 days ago

    You deserve all of the praise. There is no way I would have been able to do this without your tutorial.

  • Ibrahim
    Ibrahim 2 days ago

    I wish I could explain things like you. Thank you & keep up the good work.

  • sqeedward
    sqeedward 2 days ago

    Nice video m8 :)

  • shamrock1961
    shamrock1961 2 days ago

    Sublime wants $80 USD to continue to use it. Pycharm I guess is what I am stuck with.

    • Corey Schafer
      Corey Schafer 2 days ago

      You can try VSCode as well. I really like that editor.

  • Jad soud
    Jad soud 2 days ago

    Hey Corey, thanks for this video and all the others, I've been following you and learning from your videos since a while, I tried downloading images using Threads but it is slower than the normal one, even the first example was good, do you have an idea what could be the problem ?