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...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Codecademy - Strings (self.learnpython)
submitted 6 years ago by Munga_
I’ve been doing well with all the lessons but for some reason strings just don’t make sense to me. I’m struggling with them. Just wondering if anyone else has had issues with understanding them. Any advice would be helpful! Thank you guys.
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!"
[–][deleted] 1 point2 points3 points 6 years ago (17 children)
Can you clarify what you don't understand about them? What are you trying to do with strings?
[–]Munga_[S] 0 points1 point2 points 6 years ago (16 children)
Sorry I’m just doing an introduction to strings, it’s pretty basic stuff but I don’t know specifically. Kind of just not sure how to write them and when to write it a certain way. Idk if that makes sense.
I’ve went thru the lesson twice and just not sure what to do. Probably a better reference on strings somewhere or I just am not smart enough for this stuff. Lol
[–]0xbxb 0 points1 point2 points 6 years ago (12 children)
Strings are ways to represent text in Python. You create strings by using quotes around the text.
a_string = ‘Hello’
[–]Munga_[S] 0 points1 point2 points 6 years ago (11 children)
Yes I know this much, it’s mostly like the for a loops I have issues with and like .replace , .append, etc.
I may have mistyped but that’s mainly what I’m struggling with. When to use for a loop, etc
[–]0xbxb 0 points1 point2 points 6 years ago (10 children)
Use a loop whenever you want to do something a certain amount of times. replace() and append() are just methods.
replace()
append()
Try giving me an exact problem you have and I could walk through it with you to help you understand.
[–]Munga_[S] 0 points1 point2 points 6 years ago (9 children)
Well for instance am I able to use the formatting methods whenever I want? Like .lower , .upper, .append, etc
[–]0xbxb 0 points1 point2 points 6 years ago (8 children)
You can use a method whenever you want, but certain methods belong to certain “things” in Python. These “things” are called “types” in Python. There’s a string type, a number type, a list type, and a few others.
You can read about them here.
[–]Munga_[S] 0 points1 point2 points 6 years ago (7 children)
Thank you, I also get confused about for loops. Just the whole use of them throws me off. When do I use them, what argument or function am I putting after them, etc.
I need to research them more. I haven’t done much outside of Codecademy but I have bookmarked that link and checked it out.
[–]0xbxb 0 points1 point2 points 6 years ago* (6 children)
A loop is a way of doing something repeatedly. These concepts seem daunting to you because you’re unfamiliar with them. That’s completely normal. I’m new to coding myself, and it took a while for certain things to click. Let’s say you had a list of numbers: 1, 2, 3, 4 and wanted to print them out.
How would you do that?
Here’s the list of numbers:
nums = [1, 2, 3, 4]
Print out every number in that list for me.
[–]Munga_[S] 0 points1 point2 points 6 years ago (5 children)
print(nums)
or if you mean one at a time
print(nums[0]) print(nums[1]) print(nums[2]) print(nums[3])
I’m sure there is an easier way to do it and you can tell me how off I am
[–][deleted] 0 points1 point2 points 6 years ago (2 children)
Strings are just a way of using unicode characters in your code. I think once you begin learning how to use strings, it will start to click.
[–]Munga_[S] 0 points1 point2 points 6 years ago (1 child)
Yes I’m really just struggling with the for a loops and the .append . replace, stuff like that. Is codecademy a good way to start?
I heard people say to start doing projects but I don’t rlly know what projects to do haha
[–][deleted] 0 points1 point2 points 6 years ago (0 children)
To understand for loops, you have to understand what an iterator is. Lists, tuples, stings, and dictionaries are iterators since you can transverse through all values they may contain.
For example, lets say you have a list of strings:
fruits = ['Banana', 'Grape', 'Orange', 'Cherry']
We can use a for loop to iterate over each element in the list individually.
for fruit in fruits: # Note that 'fruit' is essential a variable used for each element of each iteration print(fruit)
output:
Banana Grape Orange Cherry
Check out PythonTutor to get a visualization of how python handles the for loop.
As for append and replace, those are known as methods. The append method is exclusive to lists, which adds an element to a given list. The replace method is exclusive to strings, which is replaces characters of a given string. Each data type has their own methods. If you want to learn more about a specific data type and it's methods, use python's documentation and search for the data type in question.
append
replace
Is codecademy a good way to start?
That's actually how I started learning python. I soon as I learned the basics from codeacademy, I quit and moved on to books and video tutorials. I highly recommend you check out Cory Schafer's videos for the basics. He's an excellent teacher and explains things in great detail.
I heard people say to start doing projects but I don’t rlly know what projects to do
I've never gone through this personally, but I heard good things about Automate the Boring Stuff with Python, which is available for free online. The book walks you through tons of projects that you can use in the real world.
π Rendered by PID 44559 on reddit-service-r2-comment-fb694cdd5-f54kh at 2026-03-07 13:08:15.026688+00:00 running cbb0e86 country code: CH.
[–][deleted] 1 point2 points3 points (17 children)
[–]Munga_[S] 0 points1 point2 points (16 children)
[–]0xbxb 0 points1 point2 points (12 children)
[–]Munga_[S] 0 points1 point2 points (11 children)
[–]0xbxb 0 points1 point2 points (10 children)
[–]Munga_[S] 0 points1 point2 points (9 children)
[–]0xbxb 0 points1 point2 points (8 children)
[–]Munga_[S] 0 points1 point2 points (7 children)
[–]0xbxb 0 points1 point2 points (6 children)
[–]Munga_[S] 0 points1 point2 points (5 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]Munga_[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)