Mentions List, Indexing before the concept of data type
What is the problem?
In the variable section it mentions using an index to get a single character from a string. It states "we can treat the string as a list of characters." But the whole concept of indexing seems like it should be introduced after the concept of list types. This of course is just my opinion. As a newbie in training and fairly new to Python (not quite 2 years) I think we could push this indexing concept back.
Location of problem (optional)
No response
I see your point. It can be confusing to talk about viewing strings as lists before lists have been introduced. However indexing is not restricted to lists and I would like to be able to talk about the first character or a substring of a string without knowing about the list data type. We have to be careful with the word list, do we mean the general english word for some sequence or the Python datatype? Some editing could be motivated here, I need to give it some thought.
On Thu, Nov 14, 2024 at 10:00 AM catgonzftw1 @.***> wrote:
What is the problem?
In the variable section it mentions using an index to get a single character from a string. It states "we can treat the string as a list of characters." But the whole concept of indexing seems like it should be introduced after the concept of list types. This of course is just my opinion. As a newbie in training and fairly new to Python (not quite 2 years) I think we could push this indexing concept back. Location of problem (optional)
No response
— Reply to this email directly, view it on GitHub https://github.com/swcarpentry/python-novice-gapminder/issues/690, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLLJBJEZAH23FQDIJGI6BL2ARRB7AVCNFSM6AAAAABRYL6MACVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY2TQMJQGQ2DCMY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi,
Yea, I think that using the word list and discussing characters as items in a list seems like it might be confusing when you move on later. I think it might be good to just say there items have a datatype and one of those are lists. Which would be discussed more in depth later but for now it's a series of values. Maybe not exactly that. It's something to think about.
How about sequence of characters instead?
I like "sequence of characters" better.