Пікірлер

  • @niklashannemann8482
    @niklashannemann848239 минут бұрын

    For beginners (especially when learning to fix problems yourself) doing 2 lstrips would also be sufficient, 1st strips "w" and 2nd strips "." Like print((link.lstrip("w")).lstrip(".")) I know it looks like a nightmare, but having students who regularly try fixing problems themselves makes one immune to judging on looks alone.

  • @heavy0119
    @heavy0119Сағат бұрын

    Of course Python already has a function for it

  • @LastSpark
    @LastSparkСағат бұрын

    what is that color scheme

  • @kushyadav5470
    @kushyadav54703 сағат бұрын

    And I thought using Ltrim 💀

  • @Szirox_
    @Szirox_5 сағат бұрын

    app name?

  • @JusticeNDOU
    @JusticeNDOU6 сағат бұрын

    so you do not have to turn into a list again as ,keys() is a list

  • @AMD-BL4ZE
    @AMD-BL4ZE6 сағат бұрын

    I mean the concept is good but I wouldn't die if it takes 0.3 seconds instead of 0.2 seconds to run the code

  • @Jolbulka
    @Jolbulka7 сағат бұрын

    if you have a problem with it, AI will surely take your job, and I'm not even using python lately

  • @FlosBlog
    @FlosBlog9 сағат бұрын

    Did you just resolve the coding prompt "make a calculator?

  • @hlubradio2318
    @hlubradio231810 сағат бұрын

    Let me try it

  • @it_is_random
    @it_is_random11 сағат бұрын

    python rule 34: if it exists there is a function for it.

  • @en8042
    @en804213 сағат бұрын

    but why is this though? Scope of the variable is decided at compile time. It doesn't try to resolve the scope every iteration, lol. Check bytecode, it should be LOAD_GLOBAL instead of LOAD_FAST, so it's known at compile time. So LOAD_FAST is faster than LOAD_GLOBAL in your example, though I'm not sure why, both them look like to me as a simple lookup in a dictionary. Btw, I also experimented with this a couple of times and I didn't see a performance gain.

  • @jasonnn12
    @jasonnn1214 сағат бұрын

    uses this syntax a lot when I code in JavaScript

  • @NoobStuff2007
    @NoobStuff200716 сағат бұрын

    Thanks man, this was very helpful.

  • @scottclowe
    @scottclowe19 сағат бұрын

    This is illegible though. Shorter code is not always better.

  • @hlubradio2318
    @hlubradio231820 сағат бұрын

    No no stinking C switch statement

  • @hlubradio2318
    @hlubradio231820 сағат бұрын

    Never heard of it bit similar to C switch statement which was very annoying

  • @kobekapoor
    @kobekapoor22 сағат бұрын

    Can you do a video on how you test performance like that?

  • @paulschwartz5277
    @paulschwartz527723 сағат бұрын

    Maybe you could answer a question for me. I run into these statements %matplotlib widget import matplotlib.pyplot as plt The % is new to me, whats going on here? Have you produced a video on this?

  • @soulspirit8687
    @soulspirit8687Күн бұрын

    Fisher and Wagner did not invent the bicycle, Levinstein invented an algorithm, it is up to you on how you would implement it

  • @blacktimes9662
    @blacktimes9662Күн бұрын

    Is list comprehension on the map function more efficient? (Asking the pro > trying it out myself)

  • @ajflink
    @ajflinkКүн бұрын

    I have created some very optimized solutions in Python that I use regularly as a solo programmer that would probably give others a heartattack.

  • @blacktimes9662
    @blacktimes9662Күн бұрын

    map-function >>>

  • @blacktimes9662
    @blacktimes9662Күн бұрын

    link = link.split("www.")[1] 👁👄👁

  • @SuperMilhauz
    @SuperMilhauzКүн бұрын

    Yeah, where are you going to use it? All these tutorials that are usefull af.

  • @papa-pete
    @papa-peteКүн бұрын

    Why would you sort a presorted input?

  • @MonirulIslam-ud3px
    @MonirulIslam-ud3pxКүн бұрын

    Whats the font name and theme name?

  • @RichardChanou
    @RichardChanouКүн бұрын

    This is very fruitful. However, I recommend that you slow down your speed. You were too fast in your speech

  • @user-xy6tv9dq9c
    @user-xy6tv9dq9cКүн бұрын

    amazing trick

  • @danyar25
    @danyar25Күн бұрын

    This works only if ANY string is accepted as “Name”. The ternary operator could work when there further checks needed, i.e. a certain min length. Then 2 lines are needed, or am I wrong?

  • @shardator
    @shardatorКүн бұрын

    Another alternative: implement caching in python interpreter? This should not be an issue.

  • @tcheuffayvan6422
    @tcheuffayvan6422Күн бұрын

    What about link.replace(‘www.’, ‘’) ?

  • @billclinton4913
    @billclinton4913Күн бұрын

    i have an idea. learn C

  • @Ihat3my1if3
    @Ihat3my1if32 күн бұрын

    Video style reminds me of a certain ship that is on fire.

  • @Top_G_69
    @Top_G_692 күн бұрын

    Which IDE is this?

  • @FB02_SW
    @FB02_SW2 күн бұрын

    Simpler one-liner: sorted(set(old), key=old.index)

  • @TonyDiCroce
    @TonyDiCroce2 күн бұрын

    So a list in python isnt a list?

  • @freds_chess
    @freds_chess2 күн бұрын

    while True: this_or_that = input("Do this or that? ") if "this" in this_or_that.lower() and "that" not in this_or_that.lower(): do_this() elif "that" in this_or_that.lower() and "this" not in this_or_that.lower(): do_that() elif "this" and "that" in this_or_that.lower(): print("You've got to pick one!" ") else: print("Invalid input! "

  • @freds_chess
    @freds_chess2 күн бұрын

    okay, fine, i guess you're right 😂😂😂

  • @coltengibbs5404
    @coltengibbs54042 күн бұрын

    What’s wrong with print(1+2)? Or print(x+y)? Genuinely asking, I’m new to programming.

  • @artwork-studios
    @artwork-studios2 күн бұрын

    Maybe a minecraft clone but it hard af

  • @colly6022
    @colly60222 күн бұрын

    isnt this the diff algorithm too?

  • @kjartannn
    @kjartannn2 күн бұрын

    I don't like these videos cause they aren't teaching you anything. To be a good programmer you have to to be a good problem solver. All this does is teach a single function you may or may not need, that you could've found while searching for it in the docs anyway.

  • @EmmettReaville
    @EmmettReaville3 күн бұрын

    what website do you use?

  • @integrantedavidanoturna
    @integrantedavidanoturna3 күн бұрын

    Djikstra was a legend, that's a really cool algorithm

  • @ayushsrivastava4692
    @ayushsrivastava46923 күн бұрын

    me with my string slicing in the corner

  • @diro9311
    @diro93113 күн бұрын

    What's len?

  • @diro9311
    @diro93113 күн бұрын

    Nvm I get is like length of the word like numbers of letters ah I see

  • @GloryGospel46
    @GloryGospel463 күн бұрын

    I am curious. The code creates an array with the name mylist, but I can't find the location where you use that array. I feel this array exists and operates but has no function

  • @Molhamkn-GamesXEdits
    @Molhamkn-GamesXEdits3 күн бұрын

    How do I make it de acending?

  • @Molhamkn-GamesXEdits
    @Molhamkn-GamesXEdits3 күн бұрын

    Wait I thought we had to do name == user_input or ‘N/A’