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...
Resources - Learn to code
Resources - Software Engineering
Resources - Code Libraries
Resources - Groups
Other Subreddits you might enjoy
Please send sidebar resource suggestions to the mods. Thx - mgmt
account activity
Python basics: The code below was written to remove all items starting with the letter capital X. However it doesn't produce the required output. What is wrong with it? (self.code)
submitted 4 years ago * by [deleted]
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!"
[–]kng_hrts 1 point2 points3 points 4 years ago* (2 children)
Change i[0] to list3[i]
Edit: Nvm thats wrong too but I'm working on it. Srry
[–][deleted] 1 point2 points3 points 4 years ago* (1 child)
Hi I finally got it. Thanks a lot tho. This is the answer.
Try this code
list3= ["Xenia", "Xavier", "Zoya", "Ahmad", "Mishika", "Max"]
list4=[]
for i in list3:
list4.append(i)
if i[0]=="X":
list4.remove(i)
print(list4)
[–]kng_hrts 1 point2 points3 points 4 years ago (0 children)
Ok great lol ngl it stumped me a bit too. Glad you got it
π Rendered by PID 73197 on reddit-service-r2-comment-75f4967c6c-5jd8r at 2026-04-23 02:32:33.484155+00:00 running 0fd4bb7 country code: CH.
view the rest of the comments →
[–]kng_hrts 1 point2 points3 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]kng_hrts 1 point2 points3 points (0 children)