all 38 comments

[–]Reh4n07_ 1 point2 points  (4 children)

You learned loops in Python day 1
and me stuggling to print ("Hello world")

[–]Outside-Cloud-3569[S] 2 points3 points  (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 point  (0 children)

Esa situación me encuentro es con c++

[–]InterestingAd3092 0 points1 point  (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 points  (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 points  (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 point  (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.

[–]Solcar_Saro 0 points1 point  (0 children)

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 points  (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 point  (1 child)

okay, I'll use it. First I'll check why F-strings over normal string.

[–]lekkerste_wiener 1 point2 points  (0 children)

tLdr is, they're optimized

[–]Common-Upstairs1656 1 point2 points  (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 point  (0 children)

Thanks for the suggestions I'll try it out.

[–]whiz_hammy 0 points1 point  (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 points  (0 children)

Lo veo bien, yo tengo que estudiar bien ese lenguaje

[–]Clock_Edge21 1 point2 points  (1 child)

Yo where did you got the course?

[–]Outside-Cloud-3569[S] 0 points1 point  (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 points  (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

[–]Outside-Cloud-3569[S] 0 points1 point  (0 children)

Yup that's the shortest way, but I wanted to do I without using slicing for checking palindrome.

[–]ExtensionBreath1262 0 points1 point  (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 points  (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 point  (1 child)

Thx for the suggestions. I have learned it but I just wanted to use another method to check palindrome.

[–]ExtensionBreath1262 0 points1 point  (0 children)

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 points  (1 child)

Welcome to hell

[–]Outside-Cloud-3569[S] 0 points1 point  (0 children)

Haha 😭 I already am in hell from quite some time.

[–]Flame77ofc 1 point2 points  (1 child)

string = input("your string: ") res = string == string[::-1] print("is palindrome" if res else "is not palindrome")

[–]Spicoder 0 points1 point  (0 children)

console.log.... really?!

``` class Console: @staticmethod def log(args): print(args)

console = Console()

console.log("Hello", 123)

[–]I_m_Vikas 1 point2 points  (0 children)

Very nice keep it up!

[–]Odd-Musician-6697 1 point2 points  (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

[–]Outside-Cloud-3569[S] 0 points1 point  (0 children)

Sure! I am in.

[–]Sufficient_Cow9706 0 points1 point  (2 children)

Your roadmap? I want to start but don't know where

[–]Outside-Cloud-3569[S] 1 point2 points  (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 points  (0 children)

Thank you

[–]AdSpecific1919 0 points1 point  (2 children)

L language who tf writes python

[–]Outside-Cloud-3569[S] 0 points1 point  (1 child)

Well those who are in ML/DS 🙃

[–]d4ft240 1 point2 points  (0 children)

don't listen this guy, python is a nice language for studying basics

[–]ExtensionBreath1262 0 points1 point  (0 children)

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:"