last_name = "last"
- first_name + " " + last_name ==> "first last"
- first_name * 3 ==> "firstfirstfirst"
- first_name[0] ==> 'f'
sa = "1234567890abcdef"
- sa[0:3] ===> "123"
- sa[:3] ===> "123"
- sa[:-5] ===> "1234567890a"
- sa[5:6] =====> "6"
- sa[5:7] =====> "67"
沒有留言:
張貼留言