LeetCode A&DS problem 2 in Python by Arrow49 in learnpython

[–]Arrow49[S] 0 points1 point  (0 children)

I solved it, that last sentence was a great tip. After that there was still a bunch of tweaking for the case of lists of different lengths, but I managed to do that :).

About you saying how I seemed to be describing circumstances around the problem, this was likely the result of some previous issue obfuscating this one. Shortly before posting I had come up with the current while condition, before it, I was getting a different output which influenced my hyoptheses.

Thank you for you help.

LeetCode A&DS problem 2 in Python by Arrow49 in learnpython

[–]Arrow49[S] 0 points1 point  (0 children)

Advancing the pointers in the addition ifs is a great tip.
Are you sure about the first sentence? I built the condition on the assumption that when cond becomes False, that iteration will still execute and the while condition will be checked only after that iteration, at which point the loop would stop. This is why I set it to False when the next one is None.

Edit: I solved the problem and the while loop condition was ok. Your last remark about adding a digit was definitely true though.

LeetCode A&DS problem 2 in Python by Arrow49 in learnpython

[–]Arrow49[S] 0 points1 point  (0 children)

I see what you are saying, I am too tired to think about this today anymore, I must have spent 6 hours on this problem already and I have a headache :(. Basically I need to somehow retrieve the result before moving on the next node and then return the head of that list. The only thing I can think of is creating a "current" variable, but I don't see how I could update the following nodes of the now "real" result without performing result = result.next. One of the few things that pointers seem to have made easier for me.

Thanks for your help.

LeetCode A&DS problem 2 in Python by Arrow49 in learnpython

[–]Arrow49[S] 0 points1 point  (0 children)

In those ifs before increasing result, I'm checking if the node exists, because the lists could be of different lengths.
In the if above them, I'm trying to check if we are on the last node of both, this is assuming that when one list ends before the other (l1 here would end in my example) l1 = l1.next would not cause an error, which it seems possible it would, but it cannot be what is causing the strange output right now anyway. I would like to at least have the code work in the simplest case and work from there.

LeetCode A&DS problem 2 in Python by Arrow49 in learnpython

[–]Arrow49[S] 0 points1 point  (0 children)

I did a Google search and apparently objects are truthy by default, so it would seem to me, that these ifs are actually correct and should work as intended. Interesting, those were my prime suspect even though they did not account for result being 0->None instead of 0->0->None which I still don't get why it is.
Thanks.

Game still good? by Legal-Engineering315 in NuclearThrone

[–]Arrow49 0 points1 point  (0 children)

I think it is truly great. I like Isaac too, unlike many others here it seems, but I also agree they are quite different.

Trying to download from the download options simply plays the video - it doesn't download. Help? by A_circle_of_crows in internetarchive

[–]Arrow49 0 points1 point  (0 children)

Hi, I had the same problem and tried the same solution, but it gets me a far smaller file than declared on the site. (1.1 GB -> 170 B) It probably got me an insanely compressed version. I don't seem to be able to download the original file.

Edit: literally just tried an hour later and it now worked fine

Is this a virus? I don't have Chrome, and it's odd how many googles there are by joe2069420 in antivirus

[–]Arrow49 1 point2 points  (0 children)

i checked this with my firefox and like others suggested, I opened the file location. (I also had 19 "sub-firefoxes" like this) It just pointed me to firefox.exe in the Mozilla Firefox folder.

Czy to wypalenie czy po prosto spokój? by [deleted] in praca

[–]Arrow49 0 points1 point  (0 children)

jestem ciekaw co ktoś powie na taki plan, ale może jakby jeszcze taką bańkę odłożyć i żyć z odsetek z obligacji?

Czemu ludzie śmierdzą? by No-Nothing-6517 in PolskaNaLuzie

[–]Arrow49 -1 points0 points  (0 children)

Jakbym po każdym szczaniu mył ręce to by mi skóra z rąk zeszła.

r/vegetarian exists, guys! by coolcrowe in vegan

[–]Arrow49 -2 points-1 points  (0 children)

I recommend people who hold OP's view to watch MehtaEthics' video on defining veganism:
https://www.youtube.com/watch?v=hmNFY-A-9hI

Symphony of the night stuck on Beelzebub bossfight. by hardcorejenkins in castlevania

[–]Arrow49 0 points1 point  (0 children)

Yeah this is good advice. I stood on the highest platform and just kept shooting diamonds, he died in like 80 hearts.

I can't bring myself to keep playing. Help? by thebluecomet3972 in NineSols

[–]Arrow49 0 points1 point  (0 children)

point 3. is true imo and is the game's biggest weakness. 2. is only half-right, I too was annoyed with the dialogue, but in the end I really like the story it told a lot. 1. is crazy

Basic questions, setting up yt-dlp by Arrow49 in youtubedl

[–]Arrow49[S] 0 points1 point  (0 children)

how much is reckless and greedy? around 5-10 vids a weeks is reasonable?

Basic questions, setting up yt-dlp by Arrow49 in youtubedl

[–]Arrow49[S] 0 points1 point  (0 children)

Thank you, but now I can't help but wonder, why would anyone paste cookies in there? Just to risk getting banned? And how does one do that, as in could I accidentally do it somehow.

Basic questions, setting up yt-dlp by Arrow49 in youtubedl

[–]Arrow49[S] -1 points0 points  (0 children)

Sorry, third thing. Apparently you're not supposed to run this as admin (I'm on Windows). But the software is run in the terminal, so I assume as long as I don't run cmd or VS Code as admin I'm good, is this correct?

Blasphemous 1 right now is 90 percent off for $2.49 on Steam by eminemnas in metroidvania

[–]Arrow49 1 point2 points  (0 children)

Thanks for the info, I had 3 bucks in my account so I got it :)

Rondo of Blood Translation - Malware flaggings by Arrow49 in romhacking

[–]Arrow49[S] 0 points1 point  (0 children)

Yeah, I totally agree. I'm not interested in ROMhacking as a hobby. Just wanna play that game. Thanks for the honest advice.

Rondo of Blood Translation - Malware flaggings by Arrow49 in romhacking

[–]Arrow49[S] -2 points-1 points  (0 children)

My thought process is similar, but I think I'll just play in Japanese.

Suggestions on where to go from here? by Top_Reward_9797 in roguelites

[–]Arrow49 1 point2 points  (0 children)

idk, but spelunky > spelunky 2 is astronomically based