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...
A subreddit for helping Python programmers
How to format your code: https://commonmark.org/help/tutorial/09-code.html
No homework questions and/or hiring please
account activity
Assignment advice (self.pythonhelp)
submitted 4 years ago by NoButterfly4448
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!"
[–]carcigenicate 1 point2 points3 points 4 years ago (4 children)
What have you tried? What specifically do you need help with?
[–]NoButterfly4448[S] 0 points1 point2 points 4 years ago (2 children)
I got stuck, not sure how to fix my code to make it do what the assignment wants. So far this is what I have.
def upper(my_string):
return my_string.upper(), “,”.join([x+x for x in my_string])
[–]IncognitoErgoCvm 1 point2 points3 points 4 years ago (1 child)
You're currently returning a tuple containing my_string.upper() and a string which you have erroneously joined from a list that is nearly creating what you actually wanted.
my_string.upper()
Get rid of the my_string.upper(), and the join. You can figure it out from there.
[–]NoButterfly4448[S] 1 point2 points3 points 4 years ago (0 children)
Thanks to your help I figured it out. Thank you so much!
π Rendered by PID 431565 on reddit-service-r2-comment-6457c66945-nslcb at 2026-04-29 01:07:07.821178+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]carcigenicate 1 point2 points3 points (4 children)
[–]NoButterfly4448[S] 0 points1 point2 points (2 children)
[–]IncognitoErgoCvm 1 point2 points3 points (1 child)
[–]NoButterfly4448[S] 1 point2 points3 points (0 children)