0
Question one : I couldn't get this statement. Please provide me an appropriate example for this statement
Topic : Comparing Sequences in python. "If one sequence is an initial sub-sequence of the other, the shorter sequence is the smaller (lesser) one"
1 Respuesta
0
From my understanding it means
"If a sequence of characters which means a string is a sub-string of another string the the sub-string will have less characters then the string"
If the sub-string is "hel" and the string in "hello" then the sub-string has less characters then the string, a sub-string means a little piece of a string
String = "hello"
Sub-string =
"h" : valid
"he" : valid
hello" : valid
"hll" : invalid
"ho" : invalid
"elo" : invalid
These is not the only list of valids and invalids there are many
Just remember: "There are finite valids but there are infinite invalids".