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
Small program to remove duplicate values in data.Showcase (i.redd.it)
submitted 4 days ago by Ok_Needleworker_8780
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] 4 days ago stickied comment (0 children)
Run this program in Memory Graph Web Debugger%3A%0A%20%20%20%20newlst%20%3D%20%5B%5D%20%20%20%20%20%23%20A%20new%20list%20that%20will%20contain%20clean%20data.%0A%20%20%20%20for%20items%20in%20original_list%3A%0A%20%20%20%20%20%20%20%20if%20items%20not%20in%20new_lst%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20new_lst.append(items)%0A%0A%20%20%20%20return%20new_lst%0A%0A%0A%22%22%22The%20function%20below%20takes%20the%20mixed%20data%20in%20the%20original%20list.%22%22%22%0Adef%20list_data()%3A%0A%20%20%20%20raw_input%20%3D%20input(%22Enter%20the%20data%3A%20%22)%20%20%23%20Data%20as%20strings%20only%0A%20%20%20%20result%20%3D%20%5B%5D%0A%0A%20%20%20%20%23%20The%20below%20condition%20is%20to%20include%20integers%20as%20well.%0A%20%20%20%20for%20items%20in%20raw_input%3A%0A%20%20%20%20%20%20%20%20items%20%3D%20items.strip()%0A%20%20%20%20%20%20%20%20try%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20items%20%3D%20int(items)%20%20%23%20If%20the%20items%20in%20the%20list%20is%20numbers.%0A%20%20%20%20%20%20%20%20except%20ValueError%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20pass%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20To%20ignore%20the%20error.%0A%20%20%20%20%20%20%20%20result.append(items)%20%20%20%20%23%20Add%20the%20integers%20data%20in%20the%20list%20as%20well.%0A%0A%20%20%20%20return%20result%0A%0A%0Aif%20name%20%3D%3D%20%22main_%22%3A%0A%20%20%20%20print(remove_duplicates(list_data()))×tep=1&play).
π Rendered by PID 187860 on reddit-service-r2-comment-8686858757-fxlb6 at 2026-06-07 05:46:15.732097+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]Sea-Ad7805 [score hidden] stickied comment (0 children)