Home > other >  Self-study python small white, consult related problems on the slice.
Self-study python small white, consult related problems on the slice.

Time:10-31

Everybody is good, new reports,
Some problems encountered in the process of self-study of python,
Although the first is can understand tutorial, but exercises is difficult to make,
Other people can understand the right answer, but make the code there is an error, but don't know where is wrong,
So to consult everybody here,
Why is this an error?

CodePudding user response:

"" the string length, unable to slice
 
If s:
The return of slice s
The else:
Return s
  • Related