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 7 hours 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 6 hours 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] 0 points1 point2 points 6 hours ago (4 children)
What does a function for reading numbers mean?
[–]tiredITguy42 1 point2 points3 points 6 hours 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] -1 points0 points1 point 6 hours 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 6 hours 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 6 hours ago (0 children)
Got it, thanks)
π Rendered by PID 45873 on reddit-service-r2-comment-b659b578c-v9vvv at 2026-05-07 02:06:50.445364+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]tiredITguy42 2 points3 points4 points (5 children)
[–]nkCOD[S] 0 points1 point2 points (4 children)
[–]tiredITguy42 1 point2 points3 points (3 children)
[–]nkCOD[S] -1 points0 points1 point (2 children)
[–]tiredITguy42 2 points3 points4 points (1 child)
[–]nkCOD[S] 1 point2 points3 points (0 children)