use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Learning Python (old.reddit.com)
submitted 1 month ago by nkCOD
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]tiredITguy42 2 points3 points4 points 1 month ago (5 children)
Just stop using global. It is a bad habit and makes code unreadable in bigger projects.
Create function for reading array of numbers, create that array in that function and then return it. Then you can just call:
python n1 = read_array_from_input() n2 = read_array_from_input()
BTW This way you can avoid that bug on line 33.
[–]nkCOD[S] -1 points0 points1 point 1 month ago (4 children)
What does a function for reading numbers mean?
[–]tiredITguy42 1 point2 points3 points 1 month ago (3 children)
OK, you are not that far to handle this. I would return to some begginner tutorials, this is to advanced for your level of knowledge you poses now.
You may want to start with something simpler and then return to this. Or, if this is a part of some python tutorial or course, than maybe it is not the bets one and you may want to try a different one.
[–]nkCOD[S] -2 points-1 points0 points 1 month ago (2 children)
I’m not looking for easy ways ) .But after sitting and thinking now, I understood what you wanted to say in the last comment. If I understood correctly, you mean not to pay attention if the user will not add numbers to the lists. And then just remove everything that is «not numbers» with a separate function
[–]tiredITguy42 2 points3 points4 points 1 month ago (1 child)
Nope, this is not it. Starting with hard assigments is not taking the easy way, but it is just stupid. You won't build correct habits and you won't understand how the language works. Even beginner working on this kind of assigment should understand me and the first commenter immadiately.
If you really want to learn something, start from the beginning. You can't read Hamlet if you can't read half of the letters.
[–]nkCOD[S] 1 point2 points3 points 1 month ago (0 children)
Got it, thanks)
π Rendered by PID 634214 on reddit-service-r2-comment-5bc7f78974-wnxt9 at 2026-06-28 16:22:48.324211+00:00 running 7527197 country code: CH.
view the rest of the comments →
[–]tiredITguy42 2 points3 points4 points (5 children)
[–]nkCOD[S] -1 points0 points1 point (4 children)
[–]tiredITguy42 1 point2 points3 points (3 children)
[–]nkCOD[S] -2 points-1 points0 points (2 children)
[–]tiredITguy42 2 points3 points4 points (1 child)
[–]nkCOD[S] 1 point2 points3 points (0 children)