(Nov-08-2019, 08:52 AM)RavCOder Wrote: I maybe I think that they refered a string is immutable like a list (then I don't know if this is correct or not).
Strings are immutable and list are mutable
sequences.
I recommend to read documentation: Sequence Types — list, tuple, range
Quote:There are three basic sequence types: lists, tuples, and range objects. Additional sequence types tailored for processing of binary data and text strings are described in dedicated sections.
There are described Common Sequence Operations, Mutable and Immutable Sequences, and Text Sequence types.
Strings and lists are iterable.
Difference between sequence and iterable can be described as: sequence has order i.e. one can access items by index (str, list, tuple, range) but iterable is capability to return one item at the time and therefore supports in addition to sequences un-ordered datastructures like sets as well.
But in no circumstances one should consider string as list.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.