r/learnpython • • Dec 24 '23

Memorizing syntax

Hello, I am new to Python and programming in general. I am learning Python on EdX, and was wondering how important it is to memorize syntax for different functions like find, replace, convert to upper/lower case, etc. Wouldn't memorizing them be redundant since they can be Chatgpted?

0 Upvotes

48 comments sorted by

View all comments

4

u/zanfar Dec 24 '23

This is the worst possible use for ChatGPT.

Remember: ChatGTP makes all of it's answers up. Sometimes, what it uses to make those answers up is correct, but there is nothing in ChatGTP that ensures, or even attempts, to make answers correct--just familiar.

Therefore, while LLMs like ChatGPT can be very useful, they should be predominantly used when you can understand and validate the answer. That is, asking ChatGPT to write a block of code is fine as long as you can read that block of code and see that it meets your needs. However, asking ChatGTP "how do I use replace() is problematic because you won't be able to know if the answer is correct.

For instance, if you ask ChatGPT the right way "how to loop through an array", there are enough incorrect answers on the Internet that it will have learned the wrong answer and will give it to you.


If you need to lookup syntax, the correct resource is the Python documentation. That is the only resource that can be said to be 100% accurate.