The Even Groups Problem in Python
3:46
Python Classes in 1 Minute!
1:26
7 ай бұрын
Why Are Sets Like This??
4:56
10 ай бұрын
*Args and **Kwargs in Python
3:49
10 ай бұрын
List Comprehension in Python
2:01
10 ай бұрын
What is Scope in Python??
10:25
Жыл бұрын
Python Yield Keyword??
3:18
Жыл бұрын
Python Lambda Functions??
4:30
Жыл бұрын
Python's Walrus Operator??
2:39
Жыл бұрын
Python Decorators in 1 Minute!
1:09
How To Make An AFK Bot!
5:13
Жыл бұрын
Python's Map Function Explained..
3:02
The Python Math Module Explained..
11:01
Using The Python Pickle Module
6:55
Пікірлер
@911Salvage
@911Salvage 20 сағат бұрын
Dijkstra's algo is pretty easy to code. One of the very first assignments we got in data structures and algorithms course was to code Dijkstra's prime number algorithm in C or Java.
@hlubradio2318
@hlubradio2318 20 сағат бұрын
Oh lordy lord
@hlubradio2318
@hlubradio2318 20 сағат бұрын
Nice but noob programming which is a reason that i dont combined multiple conditions like that on my if statements
@givowo
@givowo 20 сағат бұрын
ok but how slow is this really?
@AJBrickhead
@AJBrickhead 21 сағат бұрын
How do I move a mouse when I rotate a rotation sensor
@DownloadableFox
@DownloadableFox 21 сағат бұрын
If you are worrying about optimization, then you probably shouldn't be using Python.
@pedrocostalins8041
@pedrocostalins8041 22 сағат бұрын
print(link[4:]) ?????
@isrnick
@isrnick 22 сағат бұрын
Just use a sieve like the sieve of Eratosthenes.
@SkotzGames
@SkotzGames Күн бұрын
If you're a coder, you won't make this mistake, if you're someone who copy and pastes code, you'll make this mistake.
@RealCadde
@RealCadde Күн бұрын
Documentation lists thousands upon thousands of specific functions that do various string operations. Regex does all of these things with a simple to learn syntax.
@SilverSuperGamer
@SilverSuperGamer Күн бұрын
Fun fact: a new scope is not created in a for loop
@sherwancaris5199
@sherwancaris5199 Күн бұрын
Without music, please.....
@soldiernumberx8921
@soldiernumberx8921 Күн бұрын
Cool but you could also solve this by first removing w then make one more line to remove dot but is not so elegant
@JohannVF
@JohannVF Күн бұрын
Noob question, but where is the value/argument for "num" being provided?
@dogslife4831
@dogslife4831 Күн бұрын
Very clever use of Mod Operation
@darkblood154
@darkblood154 Күн бұрын
Javascript ==> array Python ==> list
@lebuga
@lebuga Күн бұрын
I personally use replace("www.", "")
@adityaalmighty1
@adityaalmighty1 Күн бұрын
This was nice! Well done
@911Salvage
@911Salvage Күн бұрын
Yes, I've made a similar mistake. The way the documentation for str.lstrip() was worded didn't help me one bit. Thank goodness for Google Search and StackOverflow. However, I must note that str.removeprefix() did not exist until Python 3.9.
@CripsyFries
@CripsyFries Күн бұрын
Umm acutally str is a class 🤓
@potatofuryy
@potatofuryy Күн бұрын
A* My beloved
@nvs-different-ideas
@nvs-different-ideas 2 күн бұрын
This is why I give value pointers in my own programming languages, like # - normal value, $ - system value, @ - runner/reader values Exp. dv str 7 echo str(8) echo #str
@matthewmcvicker824
@matthewmcvicker824 2 күн бұрын
New reason to hate python: printing in the definition of a function
@RS-fz4ps
@RS-fz4ps 2 күн бұрын
Meanwhile, JavaScript be like, 6 + 9? Nice!
@duukvanleeuwen2293
@duukvanleeuwen2293 2 күн бұрын
I'd use recursion
@michieleding1242
@michieleding1242 2 күн бұрын
This is actually perfect for my game !!! Thanks lol
@PultsMoizer
@PultsMoizer 2 күн бұрын
Is it ok for performance to import the whole module and just use some of the functions in there? Or always better to import all 1 by 1
@fabian1551
@fabian1551 2 күн бұрын
What font does this man use?
@yannisbaeyens
@yannisbaeyens 2 күн бұрын
We do: if user_input = '' . Is this also good?
@suvetar
@suvetar 2 күн бұрын
Good spot, that's a cheeky little impl. detail indeed! Jeff atwoood's Coding horror has a fun blog entry about obscentiy filters (20th Oct 2008). It's a fun observation if you like this stuff too!
@Gamedev-jm8el
@Gamedev-jm8el 2 күн бұрын
my version: def dup(removingdups): return sorted(set(removingdups)) old = ["a", "b", "a", "c", "b", "a"] new = dup(old) print(new) # dups stand for duplicates btw # sorted maintains order and set removes dups
@ceji566
@ceji566 2 күн бұрын
cool. your solution on my old rig takes 31 seconds. your solution on my new rig takes 14 seconds. my solution on either runs in .. error.
@TheVergile
@TheVergile 2 күн бұрын
but isnt the point of using a global that it is NOT local? As in i could be updates between two loop iterations and we want the updated value. if i wanted to specifically use the global value as is when calling the function i wouldve entered it as an argument.
@RS-fz4ps
@RS-fz4ps 2 күн бұрын
Everyone is fighting about static or dynamic typing in C/Python, but a beginner can’t make a mistake like this when you can’t use a string where a Boolean goes.
@Chill018
@Chill018 2 күн бұрын
but how would you use it in hundreds of function in different py files? would you import it from a separate file or define it in every one of those scripts with functions?
@nikdiklic
@nikdiklic 2 күн бұрын
Python devs just discovered short circuiting
@water1374
@water1374 2 күн бұрын
I think this guy did the videos for my Pearson textbook.
@amiganer681130
@amiganer681130 2 күн бұрын
Even a old C64 had that called "Def". You showed a unnamed lambda, so it can not be reused. You can say "A=lambda..." the A is more like a function. Sometimes you need to use function, so you can put it in a lambda.
@redtomato258
@redtomato258 2 күн бұрын
Thanks a lot!
@passportbro904
@passportbro904 2 күн бұрын
me getting syked to study all day so i master decorators, me after 1 minute, im running out of weed
@passportbro904
@passportbro904 2 күн бұрын
like neo in the matrix learning kung fu in 5 seconds, buzzzzeeeezzzzee (after 1 minute) I know Decorators
@dubbynelson
@dubbynelson 2 күн бұрын
python, where there's a function for everything and you learn nothing
@realitant
@realitant 2 күн бұрын
I wouldn't really consider this complete without an invalid selection resulting in a repro pt. Typos shouldn't cause a crash
@joemama-bo5ef
@joemama-bo5ef 2 күн бұрын
slicing? for link in links: print(link[4:])
@jambalaya974
@jambalaya974 2 күн бұрын
How the fuck do I have over 5 years in python and I've never used the unpacking operator? What the fuck?
@robinsonrojaslopez5200
@robinsonrojaslopez5200 2 күн бұрын
I don't know much about how the algorithm works, but if you are looking for the smallest value, I understand that it cannot be less than zero since this way you would avoid the problem of entering a cycle in which the value is decreased. infinitely, to prevent the value from being less than zero you can look at what the weights are and look for the smallest one, in the first example -30, and add the absolute weight in the rest in this way this node (and the others with existing negative values) has a value equal to or greater than zero and the problem is avoided.
@simonebranca1972
@simonebranca1972 3 күн бұрын
what could possibly go wrong? 🤔
@duukvanleeuwen2293
@duukvanleeuwen2293 3 күн бұрын
OMG I literally stumbled across this problem today!!
@happyraider815
@happyraider815 3 күн бұрын
this is what i was searching for many years ago. i am too stupid before to even know what question i should be asking. i cant find it anywhere so i just quit learning python. and now here is the answer out of nowhere. maybe this is a sign
@amiganer681130
@amiganer681130 3 күн бұрын
Here it is everytime "www.", that are 4 chars, so use link[4:].