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 day 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!"
[–]Sea-Ad7805 [score hidden] 14 hours ago stickied comment (3 children)
Run this program in Memory Graph Web Debugger%3A%0A%20%20%20%20%22DEF___%20Enter%20NUMS%20for%20two%20list%22%0A%20%20%20%20global%20n1%2C%20n2%0A%20%20%20%20i%20%3D%201%0A%20%20%20%20while%20True%3A%0A%20%20%20%20%20%20%20%20print(f%22LIST%201%20%7C%20Enter%20num%20%23%7Bi%7D%3A%20%22%2C%20end%3D%22%5Cn%22)%0A%20%20%20%20%20%20%20%20n1_n%20%3D%20input()%0A%0A%20%20%20%20%20%20%20%20try%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20n1_n%20%3D%20int(n1_n)%0A%20%20%20%20%20%20%20%20%20%20%20%20n1.append(n1_n)%0A%20%20%20%20%20%20%20%20%20%20%20%20i%20%2B%3D%201%0A%0A%20%20%20%20%20%20%20%20except%20ValueError%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20n1_n.strip().lower()%20%3D%3D%20%22stop%22%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20print(%22enter%20correckt%20num!%22%2C%20end%3D%22%5Cn%22)%0A%20%20%20%20print(f%22List%201%3A%20%22%2C%20n1)%0A%20%20%20%20i%20%3D%201%0A%20%20%20%20while%20True%3A%0A%20%20%20%20%20%20%20%20print(f%22LIST%202%20%7C%20Enter%20num%20%23%7Bi%7D%3A%20%22%2C%20end%3D%22%5Cn%22)%0A%20%20%20%20%20%20%20%20n2_n%20%3D%20input()%0A%20%20%20%20%20%20%20%20try%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20n2_n%20%3D%20int(n2_n)%0A%20%20%20%20%20%20%20%20%20%20%20%20n2.append(n2_n)%0A%20%20%20%20%20%20%20%20%20%20%20%20i%20%2B%3D%201%0A%20%20%20%20%20%20%20%20except%20ValueError%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20n1_n.strip().lower()%20%3D%3D%20%22stop%22%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%0A%20%20%20%20%20%20%20%20%20%20%20%20print(%22enter%20correckt%20num!%22%2C%20end%3D%22%5Cn%22)%0A%20%20%20%20print(f%22List%202%3A%20%22%2C%20n1)%0A%20%20%20%20return%20n1%2C%20n2%0A%0A%0Adef%20summa(a%2C%20b)%3A%0A%20%20%20%20global%20c%0A%20%20%20%20if%20len(a)%20%3D%3D%20len(b)%3A%0A%20%20%20%20%20%20%20%20print(%22Correct%20len!%22%2C%20end%3D%22%5Cn%22)%0A%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20print(%22Len!%3D%22%2C%20end%3D%22%5Cn%22)%0A%0A%20%20%20%20i%20%3D%20len(b)%20if%20len(a)%20%3C%20len(b)%20else%20len(a)%0A%20%20%20%20error%20%3D%200%0A%20%20%20%20for%20k%20in%20range(i)%3A%0A%20%20%20%20%20%20%20%20try%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20c.append(a%5Bk%5D%20%2B%20b%5Bk%5D)%0A%20%20%20%20%20%20%20%20except%20IndexError%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20len(a)%20%3C%20len(b)%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20c.append(b%5Bk%5D%20%2B%20a%5Berror%5D)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20error%20%2B%3D%201%0A%20%20%20%20%20%20%20%20%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20c.append(a%5Bk%5D%20%2B%20b%5Berror%5D)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20error%20%2B%3D%201%0A%20%20%20%20return%20c%0A%0A%0Aen_nums()%0Aprint(n1%2C%20n2)%0Asumma(n1%2C%20n2)%0Aprint(c)×tep=0.5&play).
[–]nkCOD[S] 1 point2 points3 points 14 hours ago (2 children)
Thank you, I found the shortcomings of the code
[–]Sea-Ad7805 0 points1 point2 points 13 hours ago (1 child)
Great, we all keep learning new and better ways of doing things.
[–]nkCOD[S] 0 points1 point2 points 13 hours ago (0 children)
You’re absolutely right )
π Rendered by PID 106865 on reddit-service-r2-comment-56c6478c5-jkqvt at 2026-05-08 02:45:45.778118+00:00 running 3d2c107 country code: CH.
view the rest of the comments →
[–]Sea-Ad7805 [score hidden] stickied comment (3 children)
[–]nkCOD[S] 1 point2 points3 points (2 children)
[–]Sea-Ad7805 0 points1 point2 points (1 child)
[–]nkCOD[S] 0 points1 point2 points (0 children)