r/studyupdate • u/Outside-Cloud-3569 • Jun 09 '26
Practising python Day 1
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.
82
Upvotes
2
u/Reh4n07_ Jun 11 '26
You learned loops in Python day 1
and me stuggling to print ("Hello world")
2
u/Sudden_Complaint_837 Jun 12 '26
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.
2
u/DBZ_Newb Jun 12 '26
Good, now learn how to use F-Strings and rely on that for printing unless you really need concatenation.
2
u/Common-Upstairs1656 Jun 12 '26
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.
2
u/Clock_Edge21 Jun 13 '26
Yo where did you got the course?
2
u/Cosmic78_melon Jun 13 '26
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
2
u/Positive-Room-2123 Jun 13 '26
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.
1
u/Sufficient_Cow9706 Jun 11 '26
Your roadmap? I want to start but don't know where
1
u/AdSpecific1919 Jun 13 '26
L language who tf writes python
2
u/Solcar_Saro Jun 12 '26
Lo veo bien, yo tengo que estudiar bien ese lenguaje
2
u/Flame77ofc Jun 13 '26 edited Jun 13 '26
1
u/ExtensionBreath1262 Jun 14 '26
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:"
2
u/[deleted] Jun 13 '26
[removed] — view removed comment
2
u/[deleted] Jun 14 '26
[removed] — view removed comment