I am teaching a general introductory CS course to 18-19 year olds, with Python3 as a support language, and I am not satisfied with how some students respond to strings and string literals. That is some of them struggle to understand when you should use quotes and when not.
For example, when trying to open
a file, they will write open(/the/path/to/the/file)
instead of open("/the/path/to/the/file")
and fail to correct themselves. This is just an example ; the question is not about file/filename confusion.
Conversely, some students, when asked to write a function a parameter of which is a string, will write
def example("s") :
#etc
There seem to be an underlying poor understanding of what a variable (or identifier) is. However these students are generally coping with programs that do not manipulate strings.
A related question (maybe I should post this one separately) is about the pros and cons of introducing strings before arrays/lists or the converse.
Some background
This takes place in France, in the CPGE (Classes préparatoires aux Grandes Écoles), a two-year curriculum that students may enroll in at the beginning of higher education (post-baccalauréat or post-A level or equivalent) but is physically located in high schools (lycées) and prepare students for national competitive exams (concours).
As a result, the global content of the course is mandated nationwide (including the use of Python3 as an example language) ; I can only choose the order and the manner in which I teach things. The course is mandatory for students but is not the main field of the curriculum (I have 1hr/week of blackboard course and 1hr/week lab session, compared to 10 to 12 hr/week of math and 8 to 10 hr/week of physics).
Computer science is not taught in France before university/higher education. There is only some algorithmics, taught by math teachers as well as they can, using pseudo-language and calculators languages, and not dealing with any data structure (only numbers) and no functions. So I start from zero.
Even in CPGE, the idea of teaching CS as a field in itself is quite new and not universally accepted. As a result, the nationwide CS curriculum for CPGE mandates that problems and examples should be taken from math and physics situations, which leads to string being scarcely used except for file names and data input from files (csv). Yet any concours may ask a problem about strings, since they are mentioned in the nationwide curriculum.