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

1

u/Contrabaz Dec 24 '23 edited Dec 24 '23

Know the difference between data types. Learn and play around with methods. Know how a loop works, know the difference between a for and a while. Learn to use a text file, a CSV and an XML. Then play around with the contents, like reformat it and write to a new file.

It's about learning the toolkit, and learning to solve problems with said tools. Don't think about what to type, think about what you need to solve the problem.

Like if you make a calculator. You take an input, what do you do with that input so you can add or multiply it?

Or you parsed some numbers from a CSV and want to add them to a total number, but those numbers are a string with a comma as decimal separator instead of a period...can't convert that to a float or int..how can we fix that?

If you google something make sure you understand what you use in your code. Cutting and pasting strings of code you don't understand has the opposite effect. You'll get even more confused.