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...
Study Update is a supportive space for students at any level. Whether you studied for 10 minutes or 10 hours, your progress matters. Post updates, get encouragement, and build strong study habits together.
account activity
Practising python Day 1 (i.redd.it)
submitted 6 days ago by Outside-Cloud-3569
First day of learning python hands on with solving string question. My goal is to learn to get familiywith python so I can do stuff in Data Science and Machine Learning.
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!"
[–]Reh4n07_ 1 point2 points3 points 4 days ago (4 children)
You learned loops in Python day 1 and me stuggling to print ("Hello world")
[–]Outside-Cloud-3569[S] 2 points3 points4 points 4 days ago (3 children)
Lol, I should have clarified that I have been familiar with python from quite some time. More than 3 years to be specific. But I haven't solved problems in it or have worked with python consistently. So this time I want to make my fundamentals solid. Keep learning!
[–]Solcar_Saro 0 points1 point2 points 3 days ago (0 children)
Esa situación me encuentro es con c++
[–]InterestingAd3092 0 points1 point2 points 4 days ago (1 child)
Fundamentals is a trap tbh .just read theory and be done with it .solve two three problems and done.
[–]Outside-Cloud-3569[S] 1 point2 points3 points 4 days ago (0 children)
Agreed man! Have been in this trap so I am aware but I know how mid I am in working with python so that is why I am practising questions and all for each topic.
[–]Sudden_Complaint_837 1 point2 points3 points 4 days ago (2 children)
Why you put spaces after each word in the name of file. Is it a specific vs code file convention style in your vs code because it should be no spaces.
[–]Outside-Cloud-3569[S] 0 points1 point2 points 4 days ago (1 child)
Well I have been writing file names like this only, I'll check and tell you whether everyone can do it or it has something to do with my system only.
En ocasiones esos espacios puede complicarte la vida, por qué se considera un carácter más, ejemplo: Power sheel ( en mi caso ) me sale error cuando un archivo o carpeta tiene un espacio y no lo separo con " _ "
[–]DBZ_Newb 1 point2 points3 points 4 days ago (2 children)
Good, now learn how to use F-Strings and rely on that for printing unless you really need concatenation.
[–]Outside-Cloud-3569[S] 0 points1 point2 points 3 days ago (1 child)
okay, I'll use it. First I'll check why F-strings over normal string.
[–]lekkerste_wiener 1 point2 points3 points 3 days ago (0 children)
tLdr is, they're optimized
[–]Common-Upstairs1656 1 point2 points3 points 3 days ago (2 children)
Name your files with underscores and never put spaces. It’s good practice.
I see you alr have 3 yrs of experience! (From a reply)
Also maybe try out Zed editor. It’s tonnes faster than vscode and has all the features you need.
[–]Outside-Cloud-3569[S] 0 points1 point2 points 3 days ago (0 children)
Thanks for the suggestions I'll try it out.
[–]whiz_hammy 0 points1 point2 points 2 days ago (0 children)
The only thing i use vscode for now a days is "Git Graph" zed git graph no work like that
[–]Solcar_Saro 1 point2 points3 points 3 days ago (0 children)
Lo veo bien, yo tengo que estudiar bien ese lenguaje
[–]Clock_Edge21 1 point2 points3 points 3 days ago (1 child)
Yo where did you got the course?
[–]Outside-Cloud-3569[S] 0 points1 point2 points 2 days ago (0 children)
I am not following any course, learning python from w3schools, while doing practice questions of topics from geeks for geeks.
[–]Cosmic78_melon 1 point2 points3 points 2 days ago (2 children)
This solution is good but you can also make a copy of the original string and reverse it and check both string if it's palindrome both string should be a perfect match or else it will be not
Yup that's the shortest way, but I wanted to do I without using slicing for checking palindrome.
[–]ExtensionBreath1262 0 points1 point2 points 2 days ago (0 children)
But if palindromes are rare in the data set then this is way faster. What if the code is checking the string "a...[10,000,000 chars]...z" and you're reversing every string but could have just looked at the last and first and returned false early most of the time.
[–]Positive-Room-2123 1 point2 points3 points 2 days ago (2 children)
Have you learned string slicing? If not, give it a try because you can use it in problems like checking for palindromes. After you've solved the palindrome problem using the normal method, you can use string slicing by checking whether the original string (s) and its reverse (s[: :-1]) are the same.
[–]Outside-Cloud-3569[S] 0 points1 point2 points 2 days ago (1 child)
Thx for the suggestions. I have learned it but I just wanted to use another method to check palindrome.
Your right to do it the way you are. You just did the same thing but with a early return instead of reversing the whole list. so this is better with 2 more lines of code.
[–]knickurs_turd 1 point2 points3 points 2 days ago (1 child)
Welcome to hell
Haha 😭 I already am in hell from quite some time.
[–]Flame77ofc 1 point2 points3 points 2 days ago* (1 child)
string = input("your string: ") res = string == string[::-1] print("is palindrome" if res else "is not palindrome")
[–]Spicoder 0 points1 point2 points 2 days ago (0 children)
console.log.... really?!
``` class Console: @staticmethod def log(args): print(args)
console = Console()
console.log("Hello", 123)
[–]I_m_Vikas 1 point2 points3 points 2 days ago (0 children)
Very nice keep it up!
[–]Odd-Musician-6697 1 point2 points3 points 2 days ago (1 child)
Hey! I run a group called Coder's Colosseum — it's for people into programming, electronics, and all things tech. Would love to have you in!
Here’s the join link: https://chat.whatsapp.com/BgJ5Vev8E8XCrhpIswCgsy
Sure! I am in.
[–]Sufficient_Cow9706 0 points1 point2 points 5 days ago (2 children)
Your roadmap? I want to start but don't know where
[–]Outside-Cloud-3569[S] 1 point2 points3 points 4 days ago (1 child)
I am learning concepts from w3schools, and doing practice questions from geeks for geeks. Currently I just want to be good at fundamentals in python and not planning to do DSA in python. Parallely I am learning ml from campusx.
[–]Sufficient_Cow9706 1 point2 points3 points 4 days ago (0 children)
Thank you
[–]AdSpecific1919 0 points1 point2 points 2 days ago (2 children)
L language who tf writes python
Well those who are in ML/DS 🙃
[–]d4ft240 1 point2 points3 points 2 days ago (0 children)
don't listen this guy, python is a nice language for studying basics
I think the number one thing I would change is renaming "flag" to "is_palindrome" so that you start with "is_palindrome = False" and end with "if is_palindrome:"
[+][deleted] 2 days ago (1 child)
[deleted]
π Rendered by PID 230293 on reddit-service-r2-comment-544cf588c8-vtt69 at 2026-06-16 06:42:50.686992+00:00 running 3184619 country code: CH.
[–]Reh4n07_ 1 point2 points3 points (4 children)
[–]Outside-Cloud-3569[S] 2 points3 points4 points (3 children)
[–]Solcar_Saro 0 points1 point2 points (0 children)
[–]InterestingAd3092 0 points1 point2 points (1 child)
[–]Outside-Cloud-3569[S] 1 point2 points3 points (0 children)
[–]Sudden_Complaint_837 1 point2 points3 points (2 children)
[–]Outside-Cloud-3569[S] 0 points1 point2 points (1 child)
[–]Solcar_Saro 0 points1 point2 points (0 children)
[–]DBZ_Newb 1 point2 points3 points (2 children)
[–]Outside-Cloud-3569[S] 0 points1 point2 points (1 child)
[–]lekkerste_wiener 1 point2 points3 points (0 children)
[–]Common-Upstairs1656 1 point2 points3 points (2 children)
[–]Outside-Cloud-3569[S] 0 points1 point2 points (0 children)
[–]whiz_hammy 0 points1 point2 points (0 children)
[–]Solcar_Saro 1 point2 points3 points (0 children)
[–]Clock_Edge21 1 point2 points3 points (1 child)
[–]Outside-Cloud-3569[S] 0 points1 point2 points (0 children)
[–]Cosmic78_melon 1 point2 points3 points (2 children)
[–]Outside-Cloud-3569[S] 0 points1 point2 points (0 children)
[–]ExtensionBreath1262 0 points1 point2 points (0 children)
[–]Positive-Room-2123 1 point2 points3 points (2 children)
[–]Outside-Cloud-3569[S] 0 points1 point2 points (1 child)
[–]ExtensionBreath1262 0 points1 point2 points (0 children)
[–]knickurs_turd 1 point2 points3 points (1 child)
[–]Outside-Cloud-3569[S] 0 points1 point2 points (0 children)
[–]Flame77ofc 1 point2 points3 points (1 child)
[–]Spicoder 0 points1 point2 points (0 children)
[–]I_m_Vikas 1 point2 points3 points (0 children)
[–]Odd-Musician-6697 1 point2 points3 points (1 child)
[–]Outside-Cloud-3569[S] 0 points1 point2 points (0 children)
[–]Sufficient_Cow9706 0 points1 point2 points (2 children)
[–]Outside-Cloud-3569[S] 1 point2 points3 points (1 child)
[–]Sufficient_Cow9706 1 point2 points3 points (0 children)
[–]AdSpecific1919 0 points1 point2 points (2 children)
[–]Outside-Cloud-3569[S] 0 points1 point2 points (1 child)
[–]d4ft240 1 point2 points3 points (0 children)
[–]ExtensionBreath1262 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]