the_string.py 265 B

12345678910111213
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. s = 'Python-中文'
  4. print(s)
  5. b = s.encode('utf-8')
  6. print(b)
  7. print(b.decode('utf-8'))
  8. content = 'i\'am good'
  9. content = "i'am good" #//
  10. temp = content[0,3]; #截取
  11. temp = temp + "你好";#r""" 直接显示全部内容