Scripting >> Python >> String >> Examples >> How to slice stringss = "hello world" To get string slice starting from position 0 up to and before position 4 print s[0:4] To get string slice starting from position 6 up to and before position 7 print s[6,7] To get the entire string print s[:]
|