get_dict.py 233 B

123456789
  1. fp_name = open('name.txt', 'r', encoding='utf-8')
  2. str = ''
  3. for line in fp_name.readlines():
  4. str += line.rstrip('\n')
  5. fp_name.close()
  6. print(list(str))
  7. print(len(list(str)))
  8. print(sorted(set(list(str))))
  9. print(len(set(list(str))))